0
votes

I'm struggling with a deploying a WAR file on Tomcat 7.

When I drop a new WAR file "app.war" under webapps/ and there's no existing webapps/app/... directory structure in place, then stop/start Tomcat, the webapps/app/... directory structure gets created and all the files in the WAR are unpacked to their place in this directory structure. All good.

However, when I drop a new WAR file "app.war" under webapps/ and there's already an existing webapps/app/... directory structure in place, then stop/start Tomcat, I'd like the existing files under webapps/app/... to be overwritten by the corresponding files in the WAR. Instead, nothing seems to change - none of the files in the WAR get inserted into or overwrite existing files in the webapps/app/... directory structure. It doesn't seem to be a permissions issue - even if I rename one of the existing files (say "my-class.class" to "my-class.class.old") prior to stop/starting Tomcat, there's no new my-class.class file created

1

1 Answers

2
votes

The easiest way to handle deployment in Tomcat is to use Psi probe. Thats a simple manager, which can deploy apps, show memory status, precompile jsp etc.

Just download the most recent version and put it in your webapps dir and restart Tomcat. Then access the app (/probe) and go to deployment. Check "Update the application if it is already deployed" and upload a war file. You dont even need to restart Tomcat to update your app anymore.