PDA

View Full Version : Access files outside of webapps


SkillAdvance
09-01-2010, 05:56 PM
After fighting with my ISP to allow me to upload ROOT.war, I've now realized that I have another issue with which to contend.

Part of my app allows image files to be uploaded to a directory on the server. These images will then be displayed as part of subsequent pages - in essence, I've created a custom content management system for a local dog rescue as a freebie.

I'm uploading images to a directory below webapps i.e. public_html/webapps/ROOT/uploads - when I upload a new version of the ROOT.war file, that directory will be overwritten.

Is there a further setting I need to make to prevent the deletion of files in the uploads directory i.e. to allow merging of the ROOT.war with the public_html/webapps/ROOT directory and sub-directories?

Alternatively, I can upload files to a location outside of webapps - is there a way that I can then use a URL to display the files on subsequent references to the site - as far as I can determine, I am only able to access files inside the webapps/ROOT directory structure.

Thanks for thoughts and advice.

Jeremy Russell

SkillAdvance
09-02-2010, 02:00 PM
OK; I think I found the solution - a good night's sleep clearly works wonders.

SkillAdvance
09-16-2010, 01:58 PM
The answer is at http://balusc.blogspot.com/2007/07/fileservlet.html - unfortunately, I am blocked from sending the full text due to restrictions in several things in this forum!

I've responded in a private message with my direct email address.