Chiths,

I am not 100% sure, but I think you 'forgot' to mention that David's new
Servlet should extend CocoonServlet, otherwise things would not work as
described .. ;-), which would be a shame.

Werner

Chitharanjan Das wrote:

> Create a new Servlet by name say InitServlet. Deploy this in the web.xml
> of cocoon webApp.
> Have the parameter
> <load-on-startup>1</load-on-startup> set to 1 as depicted.
>
> Instantiate all the classes and store it the Servlet context. In the
> init() function of InitServlet...
>
> ServletContext servletContext = this.getServletContext();
> servletContext.setAttribute(....,....);
>
> When Cocoon starts up, the init function of InitServlet is called and
> the logic defined in initServlet's it(ServletConfig config) method.
> Ensure that U call the super.init(config) at the end of the method.
>
> Hope this was useful...
>
> Regds,
> Chiths
>
> -----Original Message-----
> From: David LAGARDERE [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 10, 2002 3:43 AM
> To: [EMAIL PROTECTED]
> Subject: Object instanciation at cocoon startup
>
> Hello.
>
> Sorry if this question does not deal directly with
> cocoon.
> I would like to know if it is possible to instanciate
> some objects at startup and to store them in the
> Cocoon Servlet context (like I would have done within
> the init() method) so they can be available to all
> sessions.
>
> Thanks.
>
> David LAGARDERE
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to