I use this in ant (sorry for the line wrapping):

<target name="restart">
<echo>Restarting webapp[${webapp.path}] on ${tomcat.instance}</echo>
<exec dir="/usr/local/bin/" executable="wget">
<arg line="--spider --http-user=${tomcat.user} --http-passwd=${tomcat.password} http://${tomcat.server}:8080/manager/reload?path=${webapp.path}"/>
</exec>
</target>


-Tim


Mike Jackson wrote:
Personally I just run a script:

#!/bin/sh

while true
do
        echo "\nRestart Apache? (Y/n)\c"
        read INPUT
        if [ $INPUT -a $INPUT = 'n' ]
        then
                echo > /dev/null
        else
                /usr/local/bin/apache restart
        fi

        echo "\nExit Script? (y/N)\c"
        read INPUT
        if [ $INPUT -a $INPUT = 'y' ]
        then
                break
        fi
done

The "/usr/local/bin/apache" restarts apache and tomcat for me.

--mikej
-=-----
mike jackson
[EMAIL PROTECTED]


-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:20 AM
To: Tomcat Users List
Subject: Re: Bouncing Tomcat (for new classes)


Even for development server I don't like automagic reloads. (YMMV). I prefer to use the manager app to reload my webapp. I like the control and predictability.

If you are building your app via ant - there are a couple ways to
automatically have ant reload your webapp. Such as using ant call, wget,
and there are ant tasks with 4.1.X.

-Tim

Warden, Matt wrote:

On Feb 23, Tim Funk had something to say about Re: Bouncing

Tomcat (for new...



You probably had tomcat configured in the past to look for

these changes


in .class files and automatically restart the web application. For some
reason - its now turned off. (I don't like that feature anyways).


Even for a development server?



If your change is only a class change in a webapp - all you have to do
is restart the webapp.


Excellent. This is a great tip.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to