Discussion:
Shutting down and restarting Tomcat
Peter Lee
2002-11-07 19:05:17 UTC
Permalink
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?

Thanks
Turner, John
2002-11-07 19:21:18 UTC
Permalink
You have to do it slowly...it is not instant. 3-10 seconds between calls to
either of the scripts should be sufficient.

John
-----Original Message-----
Sent: Thursday, November 07, 2002 2:05 PM
Subject: Shutting down and restarting Tomcat
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
Mike Jackson
2002-11-07 19:38:45 UTC
Permalink
Try putting a delay in, sometimes tomcat doesn't quickly
enough exit for you to immediately restart. At least
not on my box (which is linux). However if you're using
Tomcat4.x you can stop and restart webapps directly, so
you may not really need to restart all of tomcat...

--mikej
-=-----
mike jackson
-----Original Message-----
Sent: Thursday, November 07, 2002 11:05 AM
Subject: Shutting down and restarting Tomcat
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
b***@attbi.com
2002-11-07 19:43:18 UTC
Permalink
Look at the Manager application in the Tomcat documentation. It will allow you
to deploy, redeploy, and restart a single application, rather than the entire
Tomcat instance. These operations take a matter of seconds.
Post by Peter Lee
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
yves lambert
2002-11-08 01:43:50 UTC
Permalink
Post by Peter Lee
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
your batch file must be like that
restart.bat
call %CATALINA_HOME%\bin\shutdown.bat
call %CATALINA_HOME%\bin\startup.bat
if it doesn't work you may set a delay between the 2 commands?
--
\/
<>
/\
Peter Lee
2002-11-08 09:16:20 UTC
Permalink
Post by yves lambert
Post by Peter Lee
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
your batch file must be like that
restart.bat
call %CATALINA_HOME%\bin\shutdown.bat
call %CATALINA_HOME%\bin\startup.bat
if it doesn't work you may set a delay between the 2 commands
What is the command for setting the delay in a Windows batch file?
I used "delay" but it didn't work.
Thanks
Chris Parker
2002-11-08 16:36:28 UTC
Permalink
Post by Peter Lee
What is the command for setting the delay in a Windows batch file?
I used "delay" but it didn't work.
Thanks
Assuming this isn't a 'day late and a dollar short', you might want to take
a look at this web site. It has all sorts of tips for DOS batch files:
http://www.calweb.com/~webspace/batch/


Additionally, there are several ways to get a time delay from a batch file.
They are described here:
http://www.calweb.com/~webspace/batch/samples/sleep.txt

Some of the things described will only work if you have the original files
(junk?) from DOS. I personally keep some of that stuff around - if all else
fails, email me directly, and I'll send the utility you need as an
attachment.


<=======================>
Chris Parker
Programmer/Analyst
Health Care Services Division
California Youth Authority
Andreas Probst
2002-11-08 08:14:12 UTC
Permalink
Hi Peter,
@echo off
echo.
echo Calling startup
echo.
call startup.bat
echo.
echo Started
echo.
pause
echo.
echo Calling shutdown
echo.
call shutdown.bat
echo.
echo Shut down
echo.
pause
startAndStop.bat
The pause command is necessary, because it takes Tomcat a few
seconds to shut down. The next call will be done after you'll
have pressed any key.

This script is an endless loop because it calls itself in the
end. To end it press Ctrl-C or the X-Button in the upper right
corner.

Andreas
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
Turner, John
2002-11-08 13:34:36 UTC
Permalink
As far as I know, there isn't one. You can only use PAUSE which waits for
user input before continuing. That won't help you, though, if you're
sitting at your keyboard tapping the spacebar or Enter key as soon as you
see the pause prompt.

You could try installing something like Cygwin and writing a shell
script...then you'd have access to the "sleep" command. Otherwise, you're
stuck with counting to yourself in-between batch file iterations.

John
-----Original Message-----
Sent: Friday, November 08, 2002 4:16 AM
To: Tomcat Users List
Subject: Re: Shutting down and restarting Tomcat
Post by yves lambert
Post by Peter Lee
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
your batch file must be like that
restart.bat
call %CATALINA_HOME%\bin\shutdown.bat
call %CATALINA_HOME%\bin\startup.bat
if it doesn't work you may set a delay between the 2 commands
What is the command for setting the delay in a Windows batch file?
I used "delay" but it didn't work.
Thanks
Tim Funk
2002-11-08 14:01:55 UTC
Permalink
Or if you have perl installed:

REM -- sleep for 2 seconds
perl -e 'sleep(2);'

-Tim
Post by Turner, John
As far as I know, there isn't one. You can only use PAUSE which waits for
user input before continuing. That won't help you, though, if you're
sitting at your keyboard tapping the spacebar or Enter key as soon as you
see the pause prompt.
You could try installing something like Cygwin and writing a shell
script...then you'd have access to the "sleep" command. Otherwise, you're
stuck with counting to yourself in-between batch file iterations.
John
-----Original Message-----
Sent: Friday, November 08, 2002 4:16 AM
To: Tomcat Users List
Subject: Re: Shutting down and restarting Tomcat
Post by yves lambert
Post by Peter Lee
I need to shutdown and then restart tomcat repeatedly for my
testing purposes. I am using a Windows batch file which will call
shutdown.bat and startup.bat. But each time Tomcat did not
restart. Is there any better way of doing this?
Thanks
--
your batch file must be like that
restart.bat
call %CATALINA_HOME%\bin\shutdown.bat
call %CATALINA_HOME%\bin\startup.bat
if it doesn't work you may set a delay between the 2 commands
What is the command for setting the delay in a Windows batch file?
I used "delay" but it didn't work.
Thanks
--
j***@hgmp.mrc.ac.uk
2002-11-08 14:30:32 UTC
Permalink
Hi,
Post by Peter Lee
What is the command for setting the delay in a Windows batch file?
I downloaded something called UnxUtils.zip from the web (can't find where
from at the moment). Amongst other Unix goodies this includes sleep.exe.
It is a package of standalone binaries and you need install/use only
those you need, unlike Cygwin or Perl which are pretty massive.

With sleep.exe on your path you could then put a line like "sleep 2" in
your batchfile to wait 2 seconds before proceeding.

Regards,

John.
MRC HGMP-RC
Srinadh Karumuri
2002-11-08 14:45:27 UTC
Permalink
Post by Peter Lee
What is the command for setting the delay in a Windows batch file?
If there isn't one you can simply write sleep.java and call using:
java sleep 2

:D

Sri
Kiev
2002-11-11 18:01:09 UTC
Permalink
Hi,

Would anybody get me a link to a tutorial showing how to make the IIS
execute JSPs and Servlets using tomcat 4.0.4

Note: I've chosen the "NT Service" option when I installed Tomcat in my
Windows XP, does it change anything? Because I've found something about the
integration of ISS using a jk_nt_service. Is it the same thing as the "NT
Service" install option?

Thanks,

Kiev
e***@codephoto.com
2002-11-08 16:47:32 UTC
Permalink
I am trying to create a custom jdbc realm. I create a class that extends org.apache.catalina.realm.JDBCRealm. When I start up my server, I get a class not found exception on my new realm class.

How am I supposed to set my paths to see the realm class I created? when I add the class to my classpath directly, then the server can't find org.apache.catalina.realm.JDBCRealm.

Thanks,
Eric
Craig R. McClanahan
2002-11-08 17:43:49 UTC
Permalink
Date: Fri, 8 Nov 2002 11:47:32 -0500
Subject: Re: Shutting down and restarting Tomcat
I am trying to create a custom jdbc realm. I create a class that
extends org.apache.catalina.realm.JDBCRealm. When I start up my server,
I get a class not found exception on my new realm class.
How am I supposed to set my paths to see the realm class I created?
when I add the class to my classpath directly, then the server can't
find org.apache.catalina.realm.JDBCRealm.
Tomcat ignores the system classpath totally. You'll need to put your
custom Realm implementation in a directory where Catalina internals can
see it -- specifically, in $CATALINA_HOME/server/classes or in a JAR file
in $CATALINA_HOME/server/lib.

For more info, see the class loader docs:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html


If you're using 4.1, you'll also want to disable the MBean support because
it won't recognize your custom Realm class. You can do this by commenting
out the two <Listener> elements at the top of server.xml.
Thanks,
Eric
Craig
Turner, John
2002-11-11 19:08:39 UTC
Permalink
http://www.getnet.net/~rbarr/TomcatOnIIS/default.htm

John
-----Original Message-----
Sent: Monday, November 11, 2002 1:01 PM
To: Tomcat Users List
Subject: TOMCAT + IIS
Hi,
Would anybody get me a link to a tutorial showing how to make the IIS
execute JSPs and Servlets using tomcat 4.0.4
Note: I've chosen the "NT Service" option when I installed
Tomcat in my
Windows XP, does it change anything? Because I've found
something about the
integration of ISS using a jk_nt_service. Is it the same
thing as the "NT
Service" install option?
Thanks,
Kiev
--
Kiev
2002-11-11 18:52:39 UTC
Permalink
Great!
It worked just fine.

Thanks.

----- Original Message -----
From: "Turner, John" <***@AAS.com>
To: "'Tomcat Users List'" <tomcat-***@jakarta.apache.org>
Sent: Monday, November 11, 2002 5:08 PM
Subject: RE: TOMCAT + IIS
Post by Turner, John
http://www.getnet.net/~rbarr/TomcatOnIIS/default.htm
John
-----Original Message-----
Sent: Monday, November 11, 2002 1:01 PM
To: Tomcat Users List
Subject: TOMCAT + IIS
Hi,
Would anybody get me a link to a tutorial showing how to make the IIS
execute JSPs and Servlets using tomcat 4.0.4
Note: I've chosen the "NT Service" option when I installed
Tomcat in my
Windows XP, does it change anything? Because I've found
something about the
integration of ISS using a jk_nt_service. Is it the same
thing as the "NT
Service" install option?
Thanks,
Kiev
--
--
<mailto:tomcat-user-***@jakarta.apache.org>
Loading...