Each time I shut down Tomcat server, it deletes my exploded webapp. What do I have to do to stop that? It's really inconvenient constantly copying it again under the webapps dir.
+1
A:
I've never seen it do that.
One option would be to place the exploded webapp in a directory outside of the Tomcat install, then add a deployment descriptor referencing it in the conf/Catalina/localhost directory. I typically work that way, and Tomcat has never deleted any files on me!
Aron
2009-11-20 09:47:32
Thanks, I'll try that.
imeikas
2009-11-20 09:53:51
+2
A:
This can happen with Tomcat 5 if you have a WAR under your webapps directory. Tomcat has 3 modes of deployment,
- Context fragment. A XML file under conf/Catalina/[host]
- WAR. A file ended with war in appBase (normally webapps)
- Directory. A directory (normally exploded WAR) in appBase
Looks like you are mixing 2 & 3 and Tomcat is confused. If you put war under webapps, Tomcat will explode it automatically. If you want explode it yourself, don't put WAR under webapps and Tomcat should leave your directory alone.
You can also run WAR without exploding it by adding this to your Context,
unpackWAR="false"
ZZ Coder
2009-11-20 13:23:05