开发者

Grails: Tomcat deployment without restarting the container

开发者 https://www.devze.com 2022-12-27 09:03 出处:网络
Off开发者_开发知识库icial guide says: Tomcat deployment is trivial and requires copying the WAR file into the

Off开发者_开发知识库icial 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 ?


The Grails tomcat plugin has some Gant scripts for this.

grails tomcat deploy
grails tomcat undeploy


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

0

精彩评论

暂无评论...
验证码 换一张
取 消