Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails: Tomcat deployment without restarting the container

Tags:

grails

tomcat

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 ?

like image 971
Oleksandr Avatar asked Apr 14 '10 11:04

Oleksandr


2 Answers

The Grails tomcat plugin has some Gant scripts for this.

grails tomcat deploy
grails tomcat undeploy
like image 120
Stefan Armbruster Avatar answered Sep 26 '22 00:09

Stefan Armbruster


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

like image 26
echox Avatar answered Sep 26 '22 00:09

echox