users@glassfish.java.net

Write protected files in docroot

From: <glassfish_at_javadesktop.org>
Date: Thu, 15 Feb 2007 10:59:01 PST

Hello,

I am using Sun Java Application Serer 9 PE, which I understand is built on GlassFish. I have a web program that uploads images into a directory in docroot. The program also displays the images on a web page and allows the user to delete the images.

I have noticed that even after the server displays the images, they are still write protected. I assume by the application server. It doesn't do it everyone time, but sometimes. So, my code to delete the files doesn't work. Does anyone know a resolution to this? I am open to ideas.


File F = new File(fileLoc);
if (f.delete() == false)
  System.out.println("Could not delete" + fileLoc);



Thanks
Mike
[Message sent by forum member 'mikebrown36' (mikebrown36)]

http://forums.java.net/jive/thread.jspa?messageID=203925