Tomcat not autodeploying war file

Historically, tomcat has never updated the exploded directory when you just drop in a new jar, at least for me. I always assumed this to be a bug, but never looked into it as there is a simple solution. Both of these should work fine:

  • Deploy the war file using the build-in Manager application. Fine if you are ok with using a GUI for production administration. Note This tool used to have issues if you deployed multiple times (again, I never delved into the details), but a Tomcat restart worked fine.
  • Stop, Delete, and Drop. Stop Tomcat, delete the exploded directory, drop in the new war file.

  • I usually set the autodeploy in server.xml to false. This allows me to drop the new war and restart tomcat without having to deal with the corresponding directory.

    Add autoDeploy = true. Works for me

    <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">