tags:

views:

170

answers:

2

Hi.

Official guide says:

Tomcat deployment is trivial and requires copying the WAR file into the TOMCAT_HOME/webapps folder and restarting the container.

But this is really painful :-(

Does there any way to deploy app without restarting Tomcat ?

+3  A: 

You don't have to restart the whole container.

Tomcat supports like the most application servers a feature called "Auto Deployment". The only thing you have to do is copy the war-File into the appropriate folder.

Auto Deploy is turned on with the attribute

autoDeploy=true

on the host tag in your server.xml configuration file.

Default in Tomcat 6 is:

  <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">

See the Tomcat documentation for various deployment ways: http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server

echox
In my experience you will end up with an out of memory exception if you "auto deploy" too many times
Scott Warren
Mmmh, which tomcat version did you use?
echox
+4  A: 

The Grails tomcat plugin has some Gant scripts for this.

grails tomcat deploy
grails tomcat undeploy
Stefan