This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I would like to be able to store files that will be linked off a web page outside of the web application itself. This would allow me to redeploy without having to backup all the files first. How do I do that?
Since servlet containers are not allowed to directly serve resources stored outside the application directory structure you will have to be indirect. Make your link point to a servlet that can use the file system to read and send the files.
Note that you will have to pay attention to setting the headers for content type and length.
Joined: Jul 03, 2008
Do you have an example or a link to an example of the servlet approach that you recommend? Thanks.