That is because the files are on a unix server in /tmp but the applet can
be run on any platform, the applet tells a servlet to delete the file
saved on the unix server in /tmp


 On Fri, 5 Oct 2001, Raghupathy, Gurumoorthy
wrote:

> u are using /tmp/ which is a unix file system directory sturcture...
> change ur logic and make it to c:\temp\lksdflsjdlfjl....
>
> guru
> -----Original Message-----
> From: Sohaila Roberts [mailto:[EMAIL PROTECTED]]
> Sent: 05 October 2001 15:29
> To: [EMAIL PROTECTED]
> Subject: Deleting files from a servlet
>
>
> Hello, I have a servlet that deletes a file from the server that the
> servlet runs on. The servlet is called from an applet. When I run this
> function on a linux box everything works fine and the file is deleted from
> the server and db entries relation to where the file is and its id are
> deleted. But when I run this from a window's box (windows 98 to be
> specific) with either IE5.5 or Netsape 4.75 the file is not deleted from
> the server but the database cmds are preformed fine. The code i'm using to
> delete the file from the server in my servlet is
>
> if(new File("/tmp/"+data.getFileName()).delete())
> {
>    out.writeObject("File Deleted");
> } else {
>    out.writeObject("File Not Deleted");
> }
>
> Is there anything specific to do to make this code work on windows?
>
> Thanks
> Sohaila
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to