I have a webapp that is deployed as a WAR file to a Tomcat 6 server. It stores some data in a directory inside the app itself. These files get overwritten when a new version of the app is deployed, but it's trivial to back them up and re-add them.
However, one of my coworkers claims that Tomcat will sometimes spontaneously re-explode my WAR file, even if the exploded version is already there, and wipe out these files. I have never seen this behavior before. I can figure out a workaround for this if I really have to, but is this something that actually happens, either spontaneously or on server restart? I'll be as interested as you to see if someone has a definitive answer. But I've never observed it to happen. I had a co-worker who was in the habit of modifying config files in WEB-INF after deployment rather than updating the WAR and redeploying, and over the space of several years I never saw these config files magically revert to what was in the WAR.
以上就是Does Tomcat occasionally redeploy WARs on its own?的详细内容，更多请关注web前端其它相关文章！