tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Running tomcat from my code
Date Thu, 12 Feb 2009 10:10:55 GMT
антон кузнецов wrote:
>  
> Hello. How can i start and stop tomcat from my own code? Something like startTomcat()
and stopTomcat() methods, which in its turn calls to some of tomcat methods. (There is a problem
that doesn't allow me to simply calls *.bat(*.sh) files). tomcat version = 6.0.13. Thanks
for your work.
> 
I'll try this one.

You can stop the whole Tomcat, by connecting to the "shutdown port" (see 
server.xml) and sending the magic shutdown string defined there.

You can probably stop and start individual *applications* within Tomcat 
programmatically, since that is what the Manager application does.
Since that application's source code is available, you can peek in it to 
see how it works.

But to start Tomcat, I believe the only way is to start the JVM in which 
Tomcat runs, and for that you probably do need to issue an 
operating-system level command.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message