By Date: <-- -->
By Thread: <-- -->

Activating a batch file when Tomcat service is started



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 (at) tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
For additional commands, e-mail: users-help (at) tomcat.apache.org