Hi all I am new to Jetty, so this may be a typical newbie question. I got Jetty running and my first Servlet executed. Still, I haven't been able to find an elegant way to stop my server. So far, I kill the process, but it seems to me this shouldn't be the way to shutdown it. Is there any other way to handle this? Thanx...
Rodrigo
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
On Fri, 30 May 2003, Rodrigo Reyes wrote:> I am new to Jetty, so this may be a typical newbie question. I got Jetty> running and my first Servlet executed. Still, I haven't been able to find an> elegant way to stop my server. So far, I kill the process, but it seems to> me this shouldn't be the way to shutdown it. Is there any other way to> handle this? Thanx...
If you are on JDK 1.3 or later, the shutdown hook should be registered, so that Jetty can shut down cleanly upon a signal.
That's how Jetty works out of the box, and is the best way we've found so far... we used to use the admin servlet but that stopped working 100% of the time somewhere between 4.0 and 4.1.
Jeff
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
Rodrigo ----- Original Message ----- From: jeff@i33.com To: jetty-discuss@yahoogroups.com Sent: Friday, May 30, 2003 1:11 PM Subject: Re: [jetty-discuss] How do I shutdown Jetty?
On Fri, 30 May 2003, Rodrigo Reyes wrote: > I am new to Jetty, so this may be a typical newbie question. I got Jetty > running and my first Servlet executed. Still, I haven't been able to find an > elegant way to stop my server. So far, I kill the process, but it seems to > me this shouldn't be the way to shutdown it. Is there any other way to > handle this? Thanx...
If you are on JDK 1.3 or later, the shutdown hook should be registered, so that Jetty can shut down cleanly upon a signal.
That's how Jetty works out of the box, and is the best way we've found so far... we used to use the admin servlet but that stopped working 100% of the time somewhere between 4.0 and 4.1.
On Un*x, you'd do something like "kill `cat jetty.pid`" (assuming the startup script leaves the background PID in jetty.pid; mine does and the script in the distribution does).
On Windows, I have no idea whatsoever how to signal a Java process.
Jeff
On Fri, 30 May 2003, Rodrigo Reyes wrote:> How do I send this signal?>
Rodrigo> ----- Original Message ----- > From: jeff@i33.com > To: jetty-discuss@yahoogroups.com > Sent: Friday, May 30, 2003 1:11 PM> Subject: Re: [jetty-discuss] How do I shutdown Jetty?>
On Fri, 30 May 2003, Rodrigo Reyes wrote:> > I am new to Jetty, so this may be a typical newbie question. I got Jetty> > running and my first Servlet executed. Still, I haven't been able to find an> > elegant way to stop my server. So far, I kill the process, but it seems to> > me this shouldn't be the way to shutdown it. Is there any other way to> > handle this? Thanx...>
If you are on JDK 1.3 or later, the shutdown hook should be registered, so > that Jetty can shut down cleanly upon a signal.>
That's how Jetty works out of the box, and is the best way we've found so > far... we used to use the admin servlet but that stopped working 100% of > the time somewhere between 4.0 and 4.1.>
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. >
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
Rodrigo ----- Original Message ----- From: jeff@i33.com To: jetty-discuss@yahoogroups.com Sent: Friday, May 30, 2003 5:54 PM Subject: Re: [jetty-discuss] How do I shutdown Jetty?
On Un*x, you'd do something like "kill `cat jetty.pid`" (assuming the startup script leaves the background PID in jetty.pid; mine does and the script in the distribution does).
On Windows, I have no idea whatsoever how to signal a Java process.
Jeff
On Fri, 30 May 2003, Rodrigo Reyes wrote: > How do I send this signal? >
Rodrigo > ----- Original Message ----- > From: jeff@i33.com > To: jetty-discuss@yahoogroups.com > Sent: Friday, May 30, 2003 1:11 PM > Subject: Re: [jetty-discuss] How do I shutdown Jetty? >
On Fri, 30 May 2003, Rodrigo Reyes wrote: > > I am new to Jetty, so this may be a typical newbie question. I got Jetty > > running and my first Servlet executed. Still, I haven't been able to find an > > elegant way to stop my server. So far, I kill the process, but it seems to > > me this shouldn't be the way to shutdown it. Is there any other way to > > handle this? Thanx... >
If you are on JDK 1.3 or later, the shutdown hook should be registered, so > that Jetty can shut down cleanly upon a signal. >
That's how Jetty works out of the box, and is the best way we've found so > far... we used to use the admin servlet but that stopped working 100% of > the time somewhere between 4.0 and 4.1. >
On Windows if you are running Jetty from the command prompt just ctrl-C or close the command window or shut down the computer, any of these will cause orderly shutdown of Jetty as you can see in the console log.
Kent
Jeff> I am on Windows Thanx anyway...>
Rodrigo>
----- Original Message ----->From: <mailto:jeff@i33.com>jeff@i33.com>To: <mailto:jetty-discuss@yahoogroups.com>jetty-discuss@yahoogroups.com>Sent: Friday, May 30, 2003 5:54 PM>Subject: Re: [jetty-discuss] How do I shutdown Jetty?>
On Un*x, you'd do something like "kill `cat jetty.pid`" (assuming the>startup script leaves the background PID in jetty.pid; mine does and the>script in the distribution does).>
On Windows, I have no idea whatsoever how to signal a Java process.>
Jeff>
On Fri, 30 May 2003, Rodrigo Reyes wrote:>> How do I send this signal?>>
Rodrigo>> ----- Original Message ----->> From: jeff@i33.com>> To: jetty-discuss@yahoogroups.com>> Sent: Friday, May 30, 2003 1:11 PM>> Subject: Re: [jetty-discuss] How do I shutdown Jetty?>>
On Fri, 30 May 2003, Rodrigo Reyes wrote:>> > I am new to Jetty, so this may be a typical newbie >>question. I got Jetty>> > running and my first Servlet executed. Still, I haven't been >>able to find an>> > elegant way to stop my server. So far, I kill the process, but >>it seems to>> > me this shouldn't be the way to shutdown it. Is there any other way to>> > handle this? Thanx...>>
If you are on JDK 1.3 or later, the shutdown hook should be registered, so>> that Jetty can shut down cleanly upon a signal.>>
That's how Jetty works out of the box, and is the best way we've found so>> far... we used to use the admin servlet but that stopped working 100% of>> the time somewhere between 4.0 and 4.1.>>
Your use of Yahoo! Groups is subject to the ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
Or try the new WONDER stop.jar in Jetty 4.2.10pre1
cheers
Kent Johnson wrote:> On Windows if you are running Jetty from the command prompt just > ctrl-C or close the command window or shut down the computer, any of > these will cause orderly shutdown of Jetty as you can see in the > console log.>
Kent>
Jeff>> I am on Windows Thanx anyway...>>
Rodrigo>>
----- Original Message ----->>From: <mailto:jeff@i33.com>jeff@i33.com>>To: <mailto:jetty-discuss@yahoogroups.com>jetty-discuss@yahoogroups.com>>Sent: Friday, May 30, 2003 5:54 PM>>Subject: Re: [jetty-discuss] How do I shutdown Jetty?>>
On Un*x, you'd do something like "kill `cat jetty.pid`" (assuming the>>startup script leaves the background PID in jetty.pid; mine does and the>>script in the distribution does).>>
On Windows, I have no idea whatsoever how to signal a Java process.>>
Jeff>>
On Fri, 30 May 2003, Rodrigo Reyes wrote:>>
How do I send this signal?>>>
Rodrigo>>> ----- Original Message ----->>> From: jeff@i33.com>>> To: jetty-discuss@yahoogroups.com>>> Sent: Friday, May 30, 2003 1:11 PM>>> Subject: Re: [jetty-discuss] How do I shutdown Jetty?>>>
On Fri, 30 May 2003, Rodrigo Reyes wrote:>>> > I am new to Jetty, so this may be a typical newbie >>>question. I got Jetty>>> > running and my first Servlet executed. Still, I haven't been >>>able to find an>>> > elegant way to stop my server. So far, I kill the process, but >>>it seems to>>> > me this shouldn't be the way to shutdown it. Is there any other way to>>> > handle this? Thanx...>>>
If you are on JDK 1.3 or later, the shutdown hook should be registered, so>>> that Jetty can shut down cleanly upon a signal.>>>
That's how Jetty works out of the box, and is the best way we've found so>>> far... we used to use the admin servlet but that stopped working 100% of>>> the time somewhere between 4.0 and 4.1.>>>
-- Greg Wilkins<gregw@mortbay.com> Phone/fax: +44 7092063462 Mort Bay Consulting Australia and UK. http://www.mortbay.com
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
Or try the new WONDER stop.jar in Jetty 4.2.10pre1>
cheers>
Kent Johnson wrote:> > On Windows if you are running Jetty from the> command prompt just > > ctrl-C or close the command window or shut down> the computer, any of > > these will cause orderly shutdown of Jetty as you> can see in the > > console log.> >
Kent> >
Jeff> >> I am on Windows Thanx anyway...> >>
Rodrigo> >>
----- Original Message -----> >>From: <mailto:jeff@i33.com>jeff@i33.com> >>To:>
<mailto:jetty-discuss@yahoogroups.com>jetty-discuss@yahoogroups.com> >>Sent: Friday, May 30, 2003 5:54 PM> >>Subject: Re: [jetty-discuss] How do I shutdown> Jetty?> >>
On Un*x, you'd do something like "kill `cat> jetty.pid`" (assuming the> >>startup script leaves the background PID in> jetty.pid; mine does and the> >>script in the distribution does).> >>
On Windows, I have no idea whatsoever how to> signal a Java process.> >>
Jeff> >>
On Fri, 30 May 2003, Rodrigo Reyes wrote:> >>
How do I send this signal?> >>>
Rodrigo> >>> ----- Original Message -----> >>> From: jeff@i33.com> >>> To: jetty-discuss@yahoogroups.com> >>> Sent: Friday, May 30, 2003 1:11 PM> >>> Subject: Re: [jetty-discuss] How do I shutdown> Jetty?> >>>
On Fri, 30 May 2003, Rodrigo Reyes wrote:> >>> > I am new to Jetty, so this may be a> typical newbie > >>>question. I got Jetty> >>> > running and my first Servlet executed.> Still, I haven't been > >>>able to find an> >>> > elegant way to stop my server. So far, I> kill the process, but > >>>it seems to> >>> > me this shouldn't be the way to shutdown it.> Is there any other way to> >>> > handle this? Thanx...> >>>
If you are on JDK 1.3 or later, the shutdown> hook should be registered, so> >>> that Jetty can shut down cleanly upon a> signal.> >>>
That's how Jetty works out of the box, and is> the best way we've found so> >>> far... we used to use the admin servlet but> that stopped working 100% of> >>> the time somewhere between 4.0 and 4.1.> >>>
Jeff> >>>
Yahoo! Groups Sponsor> >>> ADVERTISEMENT> >>>
For the latest information about Jetty, please> see >
-- > Greg Wilkins<gregw@mortbay.com> > Phone/fax: +44 7092063462> Mort Bay Consulting Australia and UK. > http://www.mortbay.com>
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
Sent: Friday, May 30, 2003 5:54 PM>>>>Subject: Re: [jetty-discuss] How do I shutdown>>
Jetty?>>
On Un*x, you'd do something like "kill `cat>>
jetty.pid`" (assuming the>>
startup script leaves the background PID in>>
jetty.pid; mine does and the>>
script in the distribution does).>>>>
On Windows, I have no idea whatsoever how to>>
signal a Java process.>>
Jeff>>>>
On Fri, 30 May 2003, Rodrigo Reyes wrote:>>>>
How do I send this signal?>>>>>
Rodrigo>>>>> ----- Original Message ----->>>>> From: jeff@i33.com>>>>> To: jetty-discuss@yahoogroups.com>>>>> Sent: Friday, May 30, 2003 1:11 PM>>>>> Subject: Re: [jetty-discuss] How do I shutdown>>
Jetty?>>
On Fri, 30 May 2003, Rodrigo Reyes wrote:>>>>> > I am new to Jetty, so this may be a>>
typical newbie >>
question. I got Jetty>>>>> > running and my first Servlet executed.>>
Still, I haven't been >>
able to find an>>>>> > elegant way to stop my server. So far, I>>
kill the process, but >>
it seems to>>>>> > me this shouldn't be the way to shutdown it.>>
-- Greg Wilkins<gregw@mortbay.com> Phone/fax: +44 7092063462 Mort Bay Consulting Australia and UK. http://www.mortbay.com
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/CefplB/TM ---------------------------------------------------------------------~->
Jetty 6+ has a folder called bin in side of the main jetty folder, you will find for *nix systems an SH file, it has various commands such as {start|stop|run|restart|check|supervise}.
There is also a windows service program. In windows you can stop a service by it's name via: net start service_name net stop service_name net pause service_name (net stop sends term signal for clean shutdown.)
If you would like to report an abuse of our service, such as a spam message, please . Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .