tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Listening to Session Creation... Need Access to Session
Date Mon, 01 Dec 2003 19:39:02 GMT


>1)  Implement SessionListener, put in web.xml file in listener tags.
>	This never seems to run.
>2)  Implement HttpSessionListener, put in web.xml file in listener
>	This runs, but doesn't seem to have access to the Session (I
need the
>username and pass off the Session to authenticate to a database).
>3)  Implement a Valve to do the same.

I'm not going to waste time on approaches 1 and 3, as they're
tomcat-specific.  #2 will work: you will get the event, with access to
the session, once the session is created.  It has no attributes at that
time, so any getAttribute call will return null.

Perhaps you are really looking for a session attribute listener?

Yoav Shapira

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message