----- Original Message ----- From: David kerber <dcker...@verizon.net> To: Tomcat Users List <users@tomcat.apache.org> Sent: Thu Oct 22 12:31:34 2009 Subject: Re: How to know when tomcat is ready to serve request
Anup K Ram wrote: > Its inside the war file. Take a look at the contextInitialized event of the ServletContextListener interface: package myPackage; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.http.HttpSessionListener; public class SiteDataStartup implements ServletContextListener { public static HttpSessionListener sessionListener; ServletContext thisContext; public void contextInitialized( ServletContextEvent sce ) { this.thisContext = sce.getServletContext(); // do your startup stuff here } public void contextDestroyed( ServletContextEvent sce ) { sessionListener = null; // do your shutdown stuff here } } > > On Wed, Oct 21, 2009 at 11:53 PM, Elli Albek <e...@sustainlane.com> wrote: > >> Where does the code that needs to know that reside? How is it initialized? >> Is it inside tomcat (war file, valve, JNDI resource) or outside the tomcat >> JVM? >> >> E >> >> ----- Original Message ----- >> From: Anup K Ram <anupk...@gmail.com> >> To: users@tomcat.apache.org >> Sent: Wed, 21 Oct 2009 16:56:50 -0700 (PDT) >> Subject: How to know when tomcat is ready to serve request >> >> Hi, >> Is there a way to know whether tomcat is started successfully and ready to >> serve requests? I need to know this programmatically. >> >> Thanks In Advance. >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org