It can be even easier. In my app I have a class that implements
HttpSessionBindingListener. It gets stored in the session and I anchor
all my session variable in it. When the session is terminated it gets
called and it cleans up all the objects it knows about. You don't have
to modify web.xml to do this.
Ralph
Stefan Pietschmann wrote:
Hi there,
I want to write a class which does some sort of cleanup when a users’s
session ends (via logout or timeout).
As I understand it I can write a class which implements
HTTPSessionListener and add it in Tomcat’s web.xml under <listeners>
and this should work. (Correct me if I’m wrong).
This relies on the Servlet API and I have to change my Tomcat
installation. However I liked it more if I could add that
SessionListener to Cocoon’s web.xml since our project CVS only
contains Cocoon, not Tomcat. Is it that easy to just implement the
HTTPSessionListener Interface and add this Listener to
cocoon/WEB-INF/web.xml?
Thanx,
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]