Search This Blog

Monday, May 7, 2012

Start / Stop Tomcat app via wget command

In my previous post i explain how to Start / Stop Tomcat app via ant command.
Please follow the instruction in the beginning of the previous post , how to set to a tomcat user a permission to run such manager commands.

Wget is a great utility to  retrieve files from the WWW.

the urls below are fit to Tomcat 7.0.26.

to stop application under tomcat use:
wget http://username:pwd@my-server:8080/manager/text/stop?path=/MySite

to start application under tomcat use:
wget http://username:pwd@my-server:8080/manager/text/start?path=/MySite


very easily to add to any batch processing .
more options could be found here

Tomcat Server Control with Wget and the Tomcat Manager 

For a complete list of tomcat manager urls - visit the Manager App HOW-TO.

Yaniv Tzanany

No comments: