You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Amir Weiss <am...@gmail.com> on 2006/06/20 13:51:09 UTC
Activating a batch file when Tomcat service is started
Hi,
How can I make a batch file activated when the Tomcat service is
(re)started?
thanks,
--Amir.
Re: Activating a batch file when Tomcat service is started
Posted by Mladen Adamovic <ad...@blic.net>.
Amir Weiss wrote:
> How can I make a batch file activated when the Tomcat service is
> (re)started?
You could make it activated before first web access.
use static MyClass = new MyClass() in index.jsp
In MyClass constructor use something like:
<snip>
Process proces=null;
try {
proces = Runtime.getRuntime().exec(cmdopt, null, new
File(tempDirectory));
} catch (IOException ex) {
ex.printStackTrace();
}
<snip>
It is rough idea but it should be helpful.
--
Mladen Adamovic
http://www.online-utility.org http://www.shortopedia.com
http://www.froola.com http://www.gift-idea4u.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org