tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Best practice application deployement
Date Mon, 06 Aug 2007 17:50:44 GMT
Hash: SHA1

Gerhardus, wrote:
> Currently when deploying a new set of war files we do the following in a
> script that runs for all our servers.
> rm -rf /home/admin/application-1.1.war
> rm -rf /usr/share/tomcat5/webapps/application-1.1.war
> sleep 20s
> /etc/init.d/tomcat5 stop

Ouch. Why do you delete the application before you stop Tomcat? I would
stop Tomcat and then delete the files.

> rm -rf /usr/share/tomcat5/work/Catalina/localhost/application-1.1
> rm -rf /usr/share/tomcat5/conf/Catalina/localhost/application-1.1.xml
> rm -rf /usr/share/tomcat5/webapps/application-1.1
> cp /home/admin/application-1.1.war /usr/share/tomcat5/webapps
> /etc/init.d/tomcat5 start

How does this even work? The first line of the script deletes
/home/admin/application-1.1.war and the second-to-last line tries to
copy it back. Shouldn't the file not even exist?

ant has an optional task to allow you to (re-)deploy WAR files to a
running Tomcat instance. This capability is probably inherited by Maven,
which is how you heard about it. Maven is not required, though, so if
you aren't using Maven, you don't have to.

Are your servers sharing any remote-mounted filesystems over NFS or
anything like that? I believe that Tomcat expands deployed WAR files to
its local work directory, so you could potentially share WAR files over
a network-mounted disk. Then, simply replace the WAR file on the network
and all 60 of your Tomcat instances will auto-re-deploy if configured to
do so. (I wouldn't recommend this for production, but that's just my own
personal bias).

- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message