On 12.09.2017 03:00, Aryeh Friedman wrote:
I have setup a webapp (main app) that is uploaded with a war file and
second one ("images") that is just a dir in the webapp dir, no war file.
Sometimes (not always) on tomcat restart/system reboot images gets
deleted. How can I prevent this.
That's easy: You just don't assume that you're patching your WAR file:
Anything that you're deploying as web application comes from one source.
If you need an extra image directory, have it outside of your website.
This also gives you a clue that you'll have to cater for a backup of
anything outside of your webapps directory - assuming that you can
rebuild your webapps any time from source.
You might want to provide a DownloadServlet in order to access those
files. This also saves you from the attack vector of someone uploading
files ending in ".jsp", that might be used for
server-side-code-execution attacks if you're having them handled the
same way any files in your webapp directory are handled by tomcat.
Olaf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org