This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes integrate a class with Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "integrate a class with Tomcat" Watch "integrate a class with Tomcat" New topic

integrate a class with Tomcat

saiprasad raut
Ranch Hand

Joined: Aug 29, 2003
Posts: 40
Hi There,
I want to run my java class with the tomcat instance (It means whenever the Tomcat is started, my java class should be instantiated ) The reason for doing this is that i have 'schedule reports' functionality to be implemented in my project.

For this i have written a java class (with the java.util.TimerTask)This class should continuosly run with tomcat and according to the schedule it will call the releated java class.

Can anybody tell me how to integrate my 'scheduler' class with Tomcat so that whenever tomcat is running my class should also run with it???

Thanks in advance..

somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I have some solution to solve this problem.

But in below code have some problem.

In above code, success in TimerTask but not complete on call Start Tomcat.

Java Developer, Thailand
saiprasad raut
Ranch Hand

Joined: Aug 29, 2003
Posts: 40
Thank you very much for your post..

From the above code what i understood is that it is calling the startup.bat.

Actually i am trying to do the reverse thing.
i want we can do some settings in tomcat configuration so that it will call my scheduler.class and it will parallelly run with tomcat...
subject: integrate a class with Tomcat
Similar Threads
integration with tomcat
Need Open Source Event Based Google Calender Written in Java
Web Page to Excel Sheet
Anyone knows about Magnolia Content Server?