tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oto Buchta <>
Subject Re: How to receive Session Manager from servlet?
Date Wed, 16 Jan 2002 10:18:38 GMT
Dne Ășt 15. leden 2002 18:17 Craig R. McClanahan napsal(a):
> Within the same webapp, you can track sessions pretty easily -- just
> create and register an HttpSessionListener that will then here about all
> session created and session destroyed events.  You can keep your own
> private collection of the session instances, without having to delve
> inside the container.

And could you tell me how can I register the listener, if the web-app element 
of web.xml, hardwired in xerces distributed with Catalina, doesn't support 
element listener? I've tried to set the appropriate dtd (PUBLIC "-//Sun 
Microsystems, Inc.//DTD Web Application 2.3//EN"), I've downloaded the dtd 
from Sun's site, xmlnorm or emacs's PSGML verified the xml document with 
element listener, I've added the listener element to the document's header 
and I've received:

tapik@pc4:/opt/jakarta-tomcat-4.0.1> cat logs/catalina.out
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
PARSE error at line 578 column 11
org.xml.sax.SAXParseException: The content of element type "web-app" must 
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

Could you help me?

As written in Javadoc for HttpSessionListener,

" Implementations of this interface may are notified of changes to the list 
of active sessions in a web application. To recieve notification events, the 
implementation class must be configured in the deployment descriptor for the 
web application. "

Thanks very much,
Oto 'tapik' Buchta

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message