Thanks, Wendy. I looked at cargo and it seems that it requires the container to be installed on the local machine in order to be able to start or stop it.
In my case I have Tomcat running on some machine with a known IP address and port number. I need to be able to send a shutdown command to that Tomcat instance and have it stutdown itself. I just noticed this piece of code in Catalina.stopServer(String[]): Socket socket = new Socket("127.0.0.1", server.getPort()); OutputStream stream = socket.getOutputStream(); String shutdown = server.getShutdown(); for (int i = 0; i < shutdown.length(); i++) stream.write(shutdown.charAt(i)); stream.flush(); stream.close(); socket.close(); This may be what I need to use in my Java class to shut down the local Tomcat instance. Any ideas on whether this is the right way to shut down a stand-alone Tomcat instance? Thanks. Oleg -----Original Message----- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 4:44 PM To: Tomcat Users List Subject: Re: starting and stopping Tomcat from Java code On 12/14/05, Oleg Lebedev <[EMAIL PROTECTED]> wrote: > I am trying to configure, start and then shutdown Tomcat from my Java > class. No idea if it will do what you want, but that requirement made me think of Cargo: http://cargo.codehaus.org/ -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. If you have questions about this email, please contact the IT Help Desk. Mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]