Hi Mike,
just disable the file cache and the protection will go away. Just edit
${glassfish.home}/domains/domain1/domain.xml and set:
> <http-file-cache file-caching-enabled="true" file-transmission-enabled="false" globally-enabled="true" hash-init-size="0" max-age-in-seconds="30" max-files-count="1024" medium-file-size-limit-in-bytes="537600" medium-file-space-in-bytes="10485760" small-file-size-limit-in-bytes="2048" small-file-space-in-bytes="1048576"/>
set file-caching-enabled="false" and globally-enabled="false"
Let me know the result.
Thanks
-- Jeanfracois
glassfish_at_javadesktop.org wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>