From users-return-209090-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Mon Mar 01 13:39:16 2010 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 18249 invoked from network); 1 Mar 2010 13:39:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Mar 2010 13:39:16 -0000 Received: (qmail 13948 invoked by uid 500); 1 Mar 2010 13:39:12 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 13788 invoked by uid 500); 1 Mar 2010 13:39:12 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 13778 invoked by uid 99); 1 Mar 2010 13:39:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Mar 2010 13:39:12 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of pid@pidster.com does not designate 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Mar 2010 13:39:04 +0000 Received: by vws19 with SMTP id 19so485292vws.18 for ; Mon, 01 Mar 2010 05:38:42 -0800 (PST) Received: by 10.220.107.20 with SMTP id z20mr3139521vco.218.1267450722004; Mon, 01 Mar 2010 05:38:42 -0800 (PST) Received: from phoenix.config (94-193-98-41.zone7.bethere.co.uk [94.193.98.41]) by mx.google.com with ESMTPS id 28sm30332075vws.11.2010.03.01.05.38.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 05:38:41 -0800 (PST) Message-ID: <4B8BC35E.5000005@pidster.com> Date: Mon, 01 Mar 2010 13:38:38 +0000 From: Pid Reply-To: pid@pidster.com Organization: Pidster Inc User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: users@tomcat.apache.org Subject: Re: Java programm to Shutdwon the tomcat server References: <27714568.post@talk.nabble.com> <1C6F1A87DD804C479CF4C0B0CAE88D54035A2977@be19.exg4.exghost.com> <4B87D3E7.1060103@pidster.com> <1C6F1A87DD804C479CF4C0B0CAE88D54035A29CE@be19.exg4.exghost.com> <4B880E8B.8060206@ice-sa.com> <1C6F1A87DD804C479CF4C0B0CAE88D54035F986B@be19.exg4.exghost.com> <4B885CC6.4050409@pidster.com> <1C6F1A87DD804C479CF4C0B0CAE88D54035F9C72@be19.exg4.exghost.com> <1C6F1A87DD804C479CF4C0B0CAE88D54035F9C75@be19.exg4.exghost.com> In-Reply-To: <1C6F1A87DD804C479CF4C0B0CAE88D54035F9C75@be19.exg4.exghost.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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