This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
It is already easy enough to kill with a script. For one, the pid is contained in a file, either under the Tomcat directory, or somewhere under var, inspect the catalina.sh and/or setenv.sh scripts to find out exactly where.
Joined: Nov 19, 2001
Quack ! I'm quite embarassed about this, the solution is already in catalina.sh Thanks alot !
# CATALINA_PID (Optional) Path of the file which should contains the pid # of catalina startup java process, when start (fork) is used
Joined: Mar 02, 2006
Also, your best bet is to call catalina.sh stop from a script, wait for a few seconds, then check whether the pid file is still there, and the pid it contains is still active, then kill it if it is. But 99% of the time catalina.sh stop works without a problem. The only time I have seen it not work, is when I have changed something with the configuration while the server was running, that then caused problem with the shutdown.