You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Per Steffensen <st...@designware.dk> on 2001/03/15 14:34:05 UTC

Some code to be run on Cocoon startup

Hi

Im am making a larger system, containing producer, processor etc, on top of Cocoon. I have some setup code that I just want run on Cocoon startup. Does Cocoon support some way to do that or should I hack some way myself?

Kind Regards

Re: Some code to be run on Cocoon startup

Posted by Berin Loritsch <bl...@apache.org>.
> Per Steffensen wrote:
> 
> Hi
> 
> Im am making a larger system, containing producer, processor etc, on top of Cocoon. I have some setup code that I just want run on
> Cocoon startup. Does Cocoon support some way to do that or should I hack some way myself?
> 
> Kind Regards

Which version?

To be fair, neither version directly supports a LifeCycle event system.
Cocoon 2 has two methods of handling that scenario:

Have the code run from a static { } block, and use the load-class
initial parameter to load that class (thus causing the static blocks
to run).

Use a Servlet 2.3 compliant Servlet Engine like Tomcat 4, and use the
new Servlet Lifecycle event system that is part of that spec.

I do not know whether Cocoon 1 will function in a Servlet 2.3 Engine.

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>