Hi I have a bulletin board scenarion (i.e. people can download files =
that others have uploaded).

The easiest solution is to simply save the uploaded files within my =
application's directory tree (e.g. .../webapps/myapp/files or similar). =
The problem with this is that if I deploy a new version of the web app, =
any previously uploaded files are nuked with the rest of the old version =
as my new version is being deployed.

My preferred solution is (at this point) to map the path "/myapp/files" =
to another directory. To do this, I'm looking for a "mapping" entry to =
put into my web.xml that would map the /myapp/files path to a directory =
outside my tomcat server (e.g. /myapp/files -> /downloads or similar). =
Unfortunately I just can't seem to find anything that would allow this =
other than writing a servlet or creating a whole new application (I can =
specify this alternate directory in the <context ...> element via the =
docBase attribute) but it would be a whole new application and cause me =
problems elsewhere.

Can I achieve this with a "mapping" entry in my web.xml (or =
context.xml)? And if so, how? Ideally this would return "correct" real =
path for a call to ServletContext.GetRealPath ("myapp/files").

Thanks

Reply via email to