Usually, when I put an updated WAR file in Tomcat's webapps folder, the appropriate webapp is automatically updated.
But sometimes, when I put in an updated WAR file, a strange thing happens: most of that webapp's folder is deleted, except some random collection of files. Of course in this case the webapp no longer works. To make it work, I must stop Tomcat, delete the folder of that webapp entirely, then restart Tomcat.
I tried to stop the webapp from the Tomcat manager before putting the WAR file in webapps - it didn't help.
I tried to change autodeploy and/or unpackwars to false, but then the webapp was not updated at all when I put in the new warfile.
I also tried to use Jenkins' deployment plugin, but the same problem happened.
System spec: Tomcat 7 on Windows 2003.