Click to See Complete Forum and Search --> : HTTP Status 404


code_e
09-07-2006, 11:18 PM
The dreaded 404.

I have a novice question. My web site contains a home grown photo gallery. I have recently pulled the directory that contains the .JPG's out of my project and, therefore, when I redeploy changes to the server (TOMCAT) my WAR file does not contain all of the many hundreds of .JPG's. This is a good thing because otherwise I would blow away any user uploaded photos (lots of 'em).

What I did was I created a folder (/usr/local/photogallery/...)

This is a folder that is not part of the web app. When my JSP tries to get a photo <IMG yadayadayada> I now get a 404 error. The error clearly shows the browser request pointed to the correct folder. So what went wrong??? Do I need to add an entry to my web.xml????

Please help.

ray326
09-08-2006, 12:38 AM
Do you have a web server front-ending Tomcat? If so you can alias that dir in its config and point your URLs accordingly. I believe that's hard if not impossible to do in the servlet engine config. Letting Tomcat server URLs that reach outside the webapp constitutes a security problem.