You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Dawn <pe...@gmail.com> on 2006/09/22 00:37:44 UTC

Restart tomcat from within tapestry

guys,

i want the ability to restart tomcat from within my web app. i want to
provide a button, which the user clicks and it restarts tomcat.

can somebody tell me how should i go about this. i am using tap3.

thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Restart tomcat from within tapestry

Posted by Daniel Jue <te...@gmail.com>.
Windows, with tomcat installed as a service (And that service probably
runs as SYSTEM)?  Hmmmm. You could do it with pstools from
Sysinternals.com.  You could also probably do it from a net command
http://technet2.microsoft.com/WindowsServer/en/library/03928250-2796-4253-8fb1-b25329ddf35f1033.mspx?mfr=true

or calling a wsh script:

http://www.codecomments.com/archive300-2004-7-239797.html

If you didn't install it as a service, there should be a batch file to
do it for you. =)

Good luck and let us know what you chose.


On 9/21/06, Peter Dawn <pe...@gmail.com> wrote:
> am using windows. so whats the location then. thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Restart tomcat from within tapestry

Posted by Peter Dawn <pe...@gmail.com>.
am using windows. so whats the location then. thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Restart tomcat from within tapestry

Posted by Martin Strand <ma...@entcap.se>.
Perhaps you could simply let your listener method run a shell script?

String[] command = {"/etc/init.d/tomcat", "restart"};
Runtime.getRuntime().exec(command);

But, Tomcat restarting itself from a web ui? You should ask your client  
why he believes he needs this... :)

On Fri, 22 Sep 2006 00:51:58 +0200, Peter Dawn <pe...@gmail.com> wrote:

> doesnt matter. the security risk is the responsibility of the client,
> if they want it then I will implement it. I will make them aware of
> the risks too.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Restart tomcat from within tapestry

Posted by Peter Dawn <pe...@gmail.com>.
doesnt matter. the security risk is the responsibility of the client,
if they want it then I will implement it. I will make them aware of
the risks too.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Restart tomcat from within tapestry

Posted by Daniel Jue <te...@gmail.com>.
That would be nice to do if possible, although it would be a huge
security risk.  I would like it since at the moment I don't have
service restart privileges on some servers. =)

On a related note, I've been battling jar locking problems when hot
deploying my web app on Tomcat.  The AntiJARLocking and
AntiResourceLocking context flags are "not real solutions" to
paraphrase one Tomcat commiter.  So restarting the service is the
preferred option.  (The jars getting locked were js-cook-menu_1.21.jar
and derby.jar, not any Tapesty jars)



On 9/21/06, Peter Dawn <pe...@gmail.com> wrote:
> guys,
>
> i want the ability to restart tomcat from within my web app. i want to
> provide a button, which the user clicks and it restarts tomcat.
>
> can somebody tell me how should i go about this. i am using tap3.
>
> thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org