Thanks for the answer. Only, these listeners belong to the Servlet API and 
not to Cocoon, so this will not work in batch mode, when there's a 
BatchContext instead of a HttpContext. Is there a Cocoon specific method?

Regards,
Jochen




Jorg Heymans <[EMAIL PROTECTED]> 
Sent by: news <[EMAIL PROTECTED]>
07.04.2005 22:24
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: Best way to initialize Context, Session and Request attributes







[EMAIL PROTECTED] wrote:
> Hi,
> 
> in my webapp I need to initialize the Context, Session and Request 
> attributes, e.g. with database connections, message queues etc. What is 
> the best way to do this in Cocoon? Right now I'm using actions, but this 

> is not satisfactory, as I have to put the action in many places in my 
> sitemaps. Is there a better way to do this, e.g. some kind of hook that 
is 
> called when Contexts, Sessions and Requests are created and disposed?

There are listeners classes available that do just this.

http://java.sun.com/products/servlet/2.3/javadoc/


HTH
Jorg


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




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

Reply via email to