How do I undeploy/completely-remove .war deployed under webapps directory when Tomcat 6.x is uninstalled?

bn. picture bn. · Dec 13, 2009 · Viewed 57k times · Source

Does anyone know of a method to remove all webapps deployed from .war files when uninstalling Tomcat (other then Shift + Delete . . .)? The reason I ask is is described below.

I am using InstallShield 2009 to lay down a copy of the JRE and Tomcat 6.x, where the Tomcat start/stop uses org.apache.catalina.startup.Bootstrap and is registered as a Windows service with a custom name. When the "program" is uninstalled certain directories need to be left behind, such as log files.

There is also behavior in place, where Installshield does not remove directories or files that it did not install. For example InstallShield has a reference to <filename>.war, but not the expanded contents into <filename>/<files> and <filename>/<directories> when Tomcat is installed and the WAR file is extracted.

Answer

Bozho picture Bozho · Dec 13, 2009

Stop tomcat, delete the .war files, start tomcat, and the exploded folders are deleted.