Hot deploy problems in Tomcat
If you try to hot-deploy a WAR file to Tomcat on Windows, you often encounter file locking issues. Windows won’t let Tomcat undeploy the old app because files are locked by the OS. Here is a fix:
Edit %CATALINA_HOME%\conf\context.xml. Find the root <Context> and add these two attributes:
<Context antiJARLocking="true" antiResourceLocking="true">
Now you can copy updated WAR files to your deploy directory and Tomcat will remove the old app and hot-deploy your new app. I’m using this on Tomcat 5.5.11 without any trouble.