Hey, Use ServletContextListener's contextInitialized method. In it you can do your Class.forName call or whatever other way you want to load the class. This is portable and doesn't depend on Tomcat's internal implementation.
Also, this is not a question for the dev mailing list, but for the users mailing list. Please see http://tomcat.apache.org/lists.html and if you have follow-up questions, post them on the users mailing list. Thanks, Yoav On 6/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hello everybody, I want to know how I can configure Tomcat to load a Singleton class on his startup routine? This class implement a cache that I want to stay in memory until Tomcat is shutted down. I've read about context but it seem to load the class only on a particular URL request.. I want the class to be loaded with Tomcat, without any request is made. Thanks to all Andrea --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]