aspose file tools*
The moose likes Tomcat and the fly likes how to delete a image file from a application running in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "how to delete a image file from a application running in Tomcat" Watch "how to delete a image file from a application running in Tomcat" New topic
Author

how to delete a image file from a application running in Tomcat

naveen garimella
Greenhorn

Joined: Apr 27, 2006
Posts: 4
Hi All,
I need to delete a Image file from a application residing in a web server.
the approach iam using is from the UI, upon selection of the Image and click the delete button, iam passing the relative path to Struts action class through a form bean. In the Action class Iam doing file deletion in the follloeing way:
boolean success = (new File("/relative path")).delete();
when i do this I get the following error

java.io.FileNotFoundException: C:\<complete file path>(Access is denied)

I came to know that we have give access permissions for the users to the application insite Tomcat container.

Can any one guide me,how to set the access permissions (read/write/delete)for the application inside the tomcat container?

Regards,
Naveen Garimella
 
jQuery in Action, 2nd edition
 
subject: how to delete a image file from a application running in Tomcat