tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynir Hübner <rey...@hugsmidjan.is>
Subject RE: getting classes to execute on tomcat startup.
Date Wed, 26 Jun 2002 17:13:16 GMT
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
 - reynir@hugsmidjan.is



> -----Original Message-----
> From: Andy Eastham [mailto:andy.eastham@gliant.com]
> 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:reynir@hugsmidjan.is]
> > 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
> > -reynir@hugsmidjan.is
> >
> >
> >
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Anthony Geoghegan [mailto:antg@eircom.net]
> > > 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:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:tomcat-user-help@jakarta.apache.org>
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message