How to do one time initialization with tomcat

2006-10-10 Thread Divick Kishore
Hi, I want to do one time initialization of some data at my back end code when using tomcat as my container. To be precise I want to initialize the DB connection to mysql db and later when connection is requested from my DB layer I want to simply return the connection from a connection

Re: How to do one time initialization with tomcat

2006-10-10 Thread David Smith
Implement a ServletContextListener to get the DataSource and store it in the ServletContext . See docs on the tomcat site and the servlet spec for details. --David Divick Kishore wrote: Hi, I want to do one time initialization of some data at my back end code when using tomcat as my