You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heligon Sandra <sa...@nextream.fr> on 2002/09/11 18:22:53 UTC

Initialisations on the first request

	Hi,

	I am working with Apache/Tomcat/Struts.
	Tomcat and Apache are defined as NT service.
	I need to do initialisations (get ORB reference) on the first
request, 
	and return errors if one problem occurs.
	How can I do ? Can somebody send me an example ?
	Do I place the initialisations in the RequestProcessor's method ?

	Thanks

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Initialisations on the first request

Posted by Robert Taylor <rt...@mulework.com>.
Take a look at ServletContextListener (Servlet 2.2 spec and higher). The
container invokes them when the web application starts up. You can pass in
init parameters via web.xml. Think of them as bootstrap classes for a
servlet container.

robert

> -----Original Message-----
> From: Thomas Recloux [mailto:trecloux@norsys.fr]
> Sent: Thursday, September 12, 2002 6:13 AM
> To: Struts Users Mailing List
> Subject: Re: Initialisations on the first request
>
>
>
> > From: "Heligon Sandra" <sa...@nextream.fr>
> > To: <st...@jakarta.apache.org>
> >  Subject: Initialisations on the first request
>
>
> > Hi,
>
> Hello,
>
> > I need to do initialisations (get ORB reference) on the first
> > request,
> > and return errors if one problem occurs.
> > How can I do ? Can somebody send me an example ?
> > Do I place the initialisations in the RequestProcessor's method ?
>
> I think that creating an Initialisation Servlet would be a better idea,
> you could call your init statements in the init() method of the servlet.
> This servlet should be load on startup (<load-on-startup> tag in web.xml)
>
> Thomas
>
> --
> Thomas Recloux
> Université d'entreprise Norsys
> trecloux@norsys.fr
> http://www.norsys.fr
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Initialisations on the first request

Posted by Thomas Recloux <tr...@norsys.fr>.
> From: "Heligon Sandra" <sa...@nextream.fr>
> To: <st...@jakarta.apache.org>
>  Subject: Initialisations on the first request


> Hi,

Hello,

> I need to do initialisations (get ORB reference) on the first
> request,
> and return errors if one problem occurs.
> How can I do ? Can somebody send me an example ?
> Do I place the initialisations in the RequestProcessor's method ?

I think that creating an Initialisation Servlet would be a better idea,
you could call your init statements in the init() method of the servlet.
This servlet should be load on startup (<load-on-startup> tag in web.xml)

Thomas

--
Thomas Recloux
Université d'entreprise Norsys
trecloux@norsys.fr
http://www.norsys.fr


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>