On Wed, 26 Jun 2002, Reynir H�bner wrote: > I am not saying what I want, I am replying to Anthony Geoghegan > request, that was in this way : > > "Is there any way of getting classes to initialise application scope > variables on Tomcat startup without having to call a servlet or JSP?" > > bye
And I think you're 100% right, the new (in the 2.3 spec) context listener events are the way to do this -- I believe that's exactly the kind of thing they were intended for. > > -----Original Message----- > > From: Andy Eastham [mailto:[EMAIL PROTECTED]] > > Sent: 26. j�n� 2002 17:12 > > To: Tomcat Users List > > Subject: RE: getting classes to execute on tomcat startup. > > > > > > Reynir, > > > > Are you saying you don't want to write your code in a servlet's init() > > method, then set the servlet to Load on Startup in web.xml? > > > > That's the way I do it. > > > > eg > > <servlet> > > <servlet-name> > > Centre > > </servlet-name> > > <servlet-class> > > com.gliant.servlet.Centre > > </servlet-class> > > <init-param> > > <param-name>ConfigFile</param-name> > > > > <param-value>/var/fgliant/config/wwws-Config.xml</param-value> > > </init-param> > > <init-param> > > > > <param-name>DisableInitialisationInfoMessages</param-name> > > <param-value>true</param-value> > > </init-param> > > <load-on-startup> > > 1 > > </load-on-startup> > > </servlet> > > > > Then all initialisation is done in the Centre servlet. > > > > Sorry if this is what you're saying you don't want to do. > > > > Andy > > > > > -----Original Message----- > > > From: Reynir H�bner [mailto:[EMAIL PROTECTED]] > > > Sent: 26 June 2002 17:54 > > > To: Tomcat Users List > > > Subject: RE: getting classes to execute on tomcat startup. > > > > > > > > > > > > I dont know, but I guess this might help : > > > > > > > > > you can write and set up ServletContextListener. > > > it has events on when the context initializes, destroyes etc. > > > > > > see the servlet api, for more instructions on how to implement one. > > > see the tomcat docs on how to install it. > > > > > > hope it helps > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: Anthony Geoghegan [mailto:[EMAIL PROTECTED]] > > > > Sent: 26. j�n� 2002 15:46 > > > > To: Tomcat Users List > > > > Subject: Re: getting classes to execute on tomcat startup. > > > > > > > > > > > > Is there any way of getting classes to initialise > > application scope > > > > variables on Tomcat startup without having to call a > > servlet or JSP? > > > > Best Regards, > > > > Anthony Geoghegan. > > > > J2EE & Oracle Consultant. > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: > > > > <mailto:[EMAIL PROTECTED]> > > > > For additional commands, e-mail: > > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > Milt Epstein Research Programmer Systems and Technology Services (STS) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
