pmad
pmad

Reputation: 1677

How to stop tomcat through a Java program?

I am starting the embedded tomcat successfully through Java program. But I am unable to stop the tomcat server. How do I stop tomcat through a Java program?.

Upvotes: 0

Views: 2582

Answers (3)

Manidip Sengupta
Manidip Sengupta

Reputation: 3611

How about a System.exec ("tomcatInstallPath/bin/shutdown.sh")

Just a sugestion, I've never tried it. I just like quick/fast/direct solutions.

Upvotes: 0

fmucar
fmucar

Reputation: 14548

and/or see this as well

http://onjava.com/pub/a/onjava/2002/04/03/tomcat.html

Upvotes: 0

卢声远 Shengyuan Lu
卢声远 Shengyuan Lu

Reputation: 32004

See: howto-embed-tomcat-6

Upvotes: 2

Related Questions