I wasn't aware of the load on start-up option.  Sweet.
Can you do that with Jsp's?
That means you can pre-initialise scheduled services as threads, cool.
Does anybody have sample web.xml entry to force load on start-up?

Best Regards,
Anthony Geoghegan.
J2EE & Oracle Consultant.
----- Original Message -----
From: "Andy Eastham" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 7:12 PM
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]>

Reply via email to