File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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...
I agree. Here's the link:
subject: integrate a class with Tomcat
It's not a secret anymore!