tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Java programm to Shutdwon the tomcat server
Date Mon, 01 Mar 2010 13:38:38 GMT
On 01/03/2010 13:09, Joseph Morgan wrote:
> Oops.. should have read the thread... I spoke too soon

We know what they're trying to do but not how they're doing it, though I 
suspect I have an idea and it's not pretty.


p

> -----Original Message-----
> From: Joseph Morgan [mailto:joseph.morgan@ignitesales.com]
> Sent: Monday, March 01, 2010 7:06 AM
> To: Tomcat Users List; pid@pidster.com
> Subject: RE: Java programm to Shutdwon the tomcat server
>
> True...we still don't have a clue what the OP's really trying to do...
>
> -----Original Message-----
> From: Pid [mailto:pid@pidster.com]
> Sent: Friday, February 26, 2010 5:44 PM
> To: Tomcat Users List
> Subject: Re: Java programm to Shutdwon the tomcat server
>
> On 26/02/2010 18:40, Joseph Morgan wrote:
>> And... if you are writing a java program do to this for you, such as a UI, then you'll
need to essentially reverse this to start it.  PID's idea to connect to the port to send the
shutdown command will work for shutting it down, but to start it back up... you'll still need
to do Runtime.getRuntime().exec(...) to get it going again from within the Java UI.
>
> At the risk of veering off-topic: if the OP wishes to start and stop
> Tomcat programmatically then they may consider the 'embedded' Tomcat method.
>
>
> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Embedded.html
>
>
> p
>
>> -----Original Message-----
>> From: André Warnier [mailto:aw@ice-sa.com]
>> Sent: Friday, February 26, 2010 12:10 PM
>> To: Tomcat Users List
>> Subject: Re: Java programm to Shutdwon the tomcat server
>>
>>
>> I suggest the following :
>>
>> I) If tomcat is running as a Windows service, then you should shut it
>> down by stopping the Windows Service (and not by stopping down Tomcat
>> directly).
>>
>> To stop the Tomcat-related Windows Service, there are two methods :
>>
>> a) use the "Services" applet of Windows
>> (e.g. "My Computer" -->   Manage -->   Services and Applications -->
>> Services -->   Apache Tomcat 6), right-click and choose "Stop service"
>>
>> b) in a command window, use the command
>> net stop "Apache Tomcat 6"
>>
>> II) If Tomcat is not running as a Windows Service, but in a command
>> window, then :
>>
>> a) if you have started Tomcat with the command "startup.bat", then a
>> separate command window was opened to run Tomcat.
>> In that case, you have 2 choices to stop Tomcat :
>>
>> a-1) in the same window where you started Tomcat with the command
>> "startup.bat", enter the command "shutdown.bat".
>>
>> a-2) in the command window where Tomcat is running, enter CTRL-C
>>
>> b) if you have started Tomcat with the command "catalina.bat run", then
>> Tomcat runs directly in the Window where you entered this command.
>> To stop it, type CTRL-C.
>>
>> c) in any of the cases (a) or (b) above, the other methods indicated in
>> the previous messages will work also.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Mime
View raw message