You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nathan Eric Probst <pr...@pond.net> on 2001/02/13 02:14:20 UTC
[OT] Web-initiated restarts for Tomcat 3.2.1?
Hello,
I'm attempting to setup a shared development server to use with a
distributed developement team. (All two of us!)
I want to allow my partner, who is doing the page design, graphics, and
JSP to "bounce" Tomcat remotely WITHOUT giving him an account on my
machine.
I've already written a simple buildServlet that updates the local copy
of our CVS project and builds it to the context directory
(webapps/our_project/). I've added the admin/reload.do Action to catch
config changes. I've set the reloadable='true' in server.xml for the
Context. Now I need to provide the ability to "bounce" Tomcat, just in
case it reloads funny.
Does anyone know of a reliable way to do this?
I've written a simple bounceServlet that uses Runtime.exec() to call a
bounce.sh script (I'm running Linux) that does a 'tomcat -stop' and
'tomcat -start'. The problem is that it work *sometimes*. There is a
race between the call to 'tomcat -stop' and 'tomcat -start'. At least,
that's my explaination.
So, does anyone have a better solution?
Nathan
Re: [OT] Web-initiated restarts for Tomcat 3.2.1?
Posted by Maya Muchnik <mm...@pumatech.com>.
I know, that sometime you can have a problem because after Tomcat (3.1)
was stopped, you need to remove compiled versions of JSP files under
tomcat/dist/tomcat/work directory. This is needed if you change JSP.
Very good idea with admin/reload.do to catch config changes. Can you share
some details? Maybe this is good idea for Tomcat project itself.
Nathan Eric Probst wrote:
> Hello,
>
> I'm attempting to setup a shared development server to use with a
> distributed developement team. (All two of us!)
>
> I want to allow my partner, who is doing the page design, graphics, and
> JSP to "bounce" Tomcat remotely WITHOUT giving him an account on my
> machine.
>
> I've already written a simple buildServlet that updates the local copy
> of our CVS project and builds it to the context directory
> (webapps/our_project/). I've added the admin/reload.do Action to catch
> config changes. I've set the reloadable='true' in server.xml for the
> Context. Now I need to provide the ability to "bounce" Tomcat, just in
> case it reloads funny.
>
> Does anyone know of a reliable way to do this?
>
> I've written a simple bounceServlet that uses Runtime.exec() to call a
> bounce.sh script (I'm running Linux) that does a 'tomcat -stop' and
> 'tomcat -start'. The problem is that it work *sometimes*. There is a
> race between the call to 'tomcat -stop' and 'tomcat -start'. At least,
> that's my explaination.
>
> So, does anyone have a better solution?
>
> Nathan
Re: [OT] Web-initiated restarts for Tomcat 3.2.1?
Posted by Jens Rehpöhler <je...@rehpoehler.de>.
Hello Nathan,
> I want to allow my partner, who is doing the page design, graphics, and
> JSP to "bounce" Tomcat remotely WITHOUT giving him an account on my
> machine.
>
> I've already written a simple buildServlet that updates the local copy
> of our CVS project and builds it to the context directory
> (webapps/our_project/). I've added the admin/reload.do Action to catch
> config changes. I've set the reloadable='true' in server.xml for the
> Context. Now I need to provide the ability to "bounce" Tomcat, just in
> case it reloads funny.
>
> Does anyone know of a reliable way to do this?
Here's a possible solution that worked with Tomcat 3.1:
If you made major changes in your web app you sometimes have to "restart" the
servlet context. In the Tomcat web administration ( /admin/contextAdmin ) it is
possible to remove a servlet context and to add new servlet contexts. If your
application is the only one that runs on the Tomcat server the easiest way would
be to give your designer a login and he can remove and add your servlet context
again (this has no effect on your server.xml). If there are other applications
on your server, I would suggest to write your on servlet-context-restart-servlet
(should be very easy by looking at the sources from the admin web app of
Tomcat).
Jens