wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Adding Schedular java program on Tomcat Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Adding Schedular java program on Tomcat Server" Watch "Adding Schedular java program on Tomcat Server" New topic
Author

Adding Schedular java program on Tomcat Server

saravanan periasamy
Greenhorn

Joined: Feb 06, 2005
Posts: 22
Hi,

I have a java program and running a web application on tomcat server (Windows/Linux/Solaris).

My problem is to start/stop the java program whenever the tomcat server start/stop.

Please help on this.
Saravanan.P
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you want to start the Java program from within your web application, a ContextListener would be the best place to do it.

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContextListener.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding Schedular java program on Tomcat Server