tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dBenjamin <...@mail.com>
Subject Re: Java programm to Shutdwon the tomcat server
Date Mon, 01 Mar 2010 04:23:19 GMT

Thanks for helping...
Can you please find my scenario?
1.	I am using windows Environment.
2.	I am using tomcat 6 binary distribution versions here we cannot get pid
from the windows.
3.	For my requirement before starting the tomcat server I need to verify the
port availability if any other application using then I have change both
shutdown port and http port.  I facing problem to change the port address, I
am validating shutdown port using socket and http port using java.net
package. When I change the port I am getting invalid request received error
WARNING: StandardServer.await: Invalid command '' received.  Because of this
error I am not able to shutdown the server. So I would like to shutdown the
server using java program. 

command prompt when we type CTRL –C server getting shutdown I would like to
know can we possible to send CTRL-C through java program. 
Runtime.getRuntime().exec("command to shut down tomcat"); here we can call
shutdown bat file to stop the server but let me know if any other way I can
stop instead calling bat file through Runtime.getRuntime().exe(“”);
Please help me to shutdown the server through java program? If possible let
me know the procedure?

-- 
View this message in context: http://old.nabble.com/Java-programm-to-Shutdwon-the-tomcat-server-tp27714568p27740049.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Mime
View raw message