антон кузнецов 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to