aspose file tools*
The moose likes Tomcat and the fly likes Help with adding class to Tomcat-5.5 startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help with adding class to Tomcat-5.5 startup" Watch "Help with adding class to Tomcat-5.5 startup" New topic
Author

Help with adding class to Tomcat-5.5 startup

Jai Muthunalla
Greenhorn

Joined: Jan 01, 2008
Posts: 11
I'm writing an Poller service(thread based class) which reads from a properties file & sets some LOG parameters of Java logging package.

I want this Poller class to be invoked/started on start-up of Tomcat web-server. I don't want this to be part of any web application.
Can someone please let me know how do I achieve this?

Thanks in advance.
[ May 13, 2008: Message edited by: Jai Muthunalla ]

SCJP(1.4)
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
Please see if this information satisfies your requirement.


How to configure startup class in Tomcat 5.5 and above


http://www.skillassert.com


Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by karthi keyan:
Please see if this information satisfies your requirement.
[/URL]

This article shows how to create a startup class inside a webapp.
The original poster specifically stated that he didn't want to do that.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
As per to my knowledge Tomcat does not have any Interface or similar feature [servers like weblogic have the feature]. But if startup class under consideration does not make sense to be associated with any of the web application, my suggestion is to create a separate web application whose only purpose is to configure this start up class.
[ May 15, 2008: Message edited by: karthi keyan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with adding class to Tomcat-5.5 startup