Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: how to delete file using jsp?


Message #1 by "Roy Ngan" <kkngan@n...> on Thu, 15 Mar 2001 05:43:38
/productimg/image.gif - is your file on the virtual path, not on the real 
path... basically, you cannot find it, hence, you need to specify real path: 
  new File ("/Whatever_your_real_path_is/productimg/image.gif")...

Good luck


>From: "Roy Ngan" <kkngan@n...>
>Reply-To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>Subject: [pro_jsp] how to delete file using jsp?
>Date: Thu, 15 Mar 2001 05:43:38
>
>Dear All,
>
>    I'm currently working on deleting file using jsp
>
>    some of U suggest me to use the .delete() method, but it just can't
>work , i don't know the reason, below is my code
>
>   <%@ page import="java.io.File" %>
>
>   File myFile = new File("/productimg/image.gif");
>   myFile.delete();
>
>can someone tell me why? and how to fix it ?. thanks
>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


  Return to Index