I have a static method that starts a thread with a class that does some
clean-up tasks.
public static void init(){
Thread t = new Thread( new ClearUserHashMapClient() );
t.start();
}//init
How can I configure my webapp to call this init() method when I deploy my
war file on Tomcat.
Howdy,
Implement a javax.servlet.ServletContextListener, and call that init
method in the listener's contextInitialized() event. Don't forget to
put the listener in your webapp's web.xml file.
public static void init(){
Thread t = new Thread( new ClearUserHashMapClient() );
t.start();
class and immediately executes
its init.
Scott Purcell
Vertis Corporation
-Original Message-
From: Chandra Gottipati [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 9:45 AM
To: Tomcat Users List
Subject: Starting a Clean-up program
I have a static method that starts a thread