Is there a way to save files to a directory which will survive upgrades to the web application?
Location: http://www.jguru.com/faq/view.jsp?EID=726038 Created: Jan 18, 2002 Author: Marcel Offermans (http://www.jguru.com/guru/viewbio.jsp?EID=5070) Question originally posed by Ferenc Ppai (http://www.jguru.com/guru/viewbio.jsp?EID=524255 Additional info As I read myself through the documentation (tomcat 4.0) the only possible upgrade for a webapp is to replace the old war file and delete the webapp’s folder and restart tomcat. But in this case all the saved preferences are lost! The scenario is basicaly the following: • The client receives the application as a war. It drops it in the webapps directory. Runtime it configures the application through its user interface, and that data is saved in the context’s WEB-INF folder. • The client receives the update, also in a war format. To apply the update, tomcat 4.0 needs to undeploy the old version, which is basically equals with deleting the old application’s folder. • Finally if the folder is deleted all configuration data previously se