tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Java programm to Shutdwon the tomcat server
Date Mon, 01 Mar 2010 12:16:50 GMT
On 01/03/2010 04:23, dBenjamin wrote:
> 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
> package.

How are you doing this, inside a Tomcat application, or outside of it - 
if so please explain more.

> 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.

How are you changing the port, in what bit of code?
It sounds like you're doing something wrong here.

> 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?

Forget this for now, until we establish the above.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message