On 6/1/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> From: Andrea Sacco [mailto:[EMAIL PROTECTED]
> Subject: How to load a static class on Tomcat startup
>
> I want to know how I can configure Tomcat to load my
> Singleton class on his startup routine?


Make the Singleton class implement ServletContextListener ,
and register the Singleton class as a listener in web.xml

The syntax for registering the listener in web.xml is specific to
the version of Tomcat ( Servlet Specification ) you are using.


Sounds like you need a Listener:
http://tomcat.apache.org/tomcat-6.0-doc/config/engine.html#Lifecycle%20L
isteners
http://tomcat.apache.org/tomcat-5.5-doc/config/engine.html#Lifecycle%20L
isteners

 - Chuck


-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to