Reputation: 7949
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.
Upvotes: 9
Views: 67054
Reputation: 1675
if you want to avoid the this whole exploded war file hassle try to alter location-of-tomcat\conf\server.xml
file.
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
into
<Host name="localhost" appBase="webapps"
unpackWARs="false" autoDeploy="true">
Upvotes: 3
Reputation: 1905
Go to tomcat homepage. Click on Manager App. Give proper username and password. You will see a list of all applications. Locate your app. There is a button "undeploy". Click it. Done!
Upvotes: 3
Reputation: 7949
The method of complete removal of Tomcat and .WAR files used to satisfy InstallShield2009 was to (via InstallShield2009):
If anyone out there knows of a way via command-line switch or something to tell Tomcat to remove all, or specific directories under /webapps/ then please respond, otherwise I'm going to accept the steps above as the answer.
Upvotes: 5
Reputation: 570335
If by uninstalling Tomcat you mean deleting it, then the .war files under the webapps
directory and the working files located in the work
directory will be deleted too. So I actually don't really get the question. And if uninstalling means something else, you now know where to look and what to do :)
Upvotes: 2
Reputation: 597076
Stop tomcat, delete the .war files, start tomcat, and the exploded folders are deleted.
Upvotes: 14