Amar Mond
Amar Mond

Reputation: 195

Tomcat Servlet Restart

I am writing a batch job to restart a tomcat servlet ever night. Right now I use the following command on Ubuntu:

service tomcat7 restart

this restarts tomcat along with all webapps running on it. Is there a way to selectively restart a single servlet on tomcat. I need something like:

restart webapp1 on tomcat7

Also, can this be done from inside a java program?

Upvotes: 0

Views: 610

Answers (1)

matt forsythe
matt forsythe

Reputation: 3912

There is a web admin interface to tomcat that allows you to redeploy a single application. You use something like curl to hit the URL's via command line to make your application redeploy.

Upvotes: 1

Related Questions