dcsimg
Need to extract a particular session via session IDs from jsp webapp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ryan_Phelan
Posted On:   Saturday, March 29, 2003 09:39 AM

Hi! I'm using a 2.3 servlet specification (via apache tomcat)and need a way for me to pull a particular session from online application in a servlet so that I might do some basic manipulation on that session. I noticed that in spec 2.1 they had a method to do this, but has since been deprecated due to security reasons. Is there some other way that this can be accomplished? Any help or comments would be greatly appcreciated and thank you for your time and concern!

Ryan

Re: Need to extract a particular session via session IDs from jsp webapp

Posted By:   Jonathan_Downey  
Posted On:   Monday, March 31, 2003 01:40 AM

Seeing as you're using 2.3, you could create an object that implements HttpSessionListener (you'll need to define in it the web.xml too). When the sessionCreated method is called by someone starting a Session, remember them (use a HashTable) by keying the session against the SessionId. In the sessionDestroyed remove it from the HashTable. Then you can do anything you want with the values in the HashTable.

Jonathan.

About | Sitemap | Contact