You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Hart, Justin" <JH...@sfa.com> on 2003/12/01 20:25:53 UTC

Listening to Session Creation... Need Access to Session

Ok, here's what I've tried.

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 tags.
	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 saw that SingleSignOn uses a valve implementation, and is a SessionListener.  I see that it sets itself up to listen to its sessions, but now how this code is ever called!

So, my question is:
	1)  Can I use SessionListener in any meaningful way?  Is there a way to add this to my xml files that I am unaware of?
	2)  Can I get to the Session (or at least the data I need) from HttpSessionListener?
	3)  Why isn't my valve running?  It's just <valve className="theClass"> in my server.xml, right?

Justin

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org