aspose file tools*
The moose likes Servlets and the fly likes Are there any ways to retrieve HttpSession object by SessionID (Servlet API 2.3)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Are there any ways to retrieve HttpSession object by SessionID (Servlet API 2.3)?" Watch "Are there any ways to retrieve HttpSession object by SessionID (Servlet API 2.3)?" New topic
Author

Are there any ways to retrieve HttpSession object by SessionID (Servlet API 2.3)?

Andrei Tarkhov
Greenhorn

Joined: Jun 13, 2002
Posts: 1
Are there any ways to retrieve HttpSession by SessionID (Servlet API 2.3)?
Thanks a lot,
Astar
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Not that I am aware of. You first need to create or bind to a session first with getSession(), and you can get the ID of the current session with getID().


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
As I recall, that capability was removed from the servlet API because it was thought to be a security risk. In the 2.0 API there was a HttpSessionContext interface but it got deprecated in the 2.1 API.
You can of course make your own methods to track the sessions your servlet creates.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Are there any ways to retrieve HttpSession object by SessionID (Servlet API 2.3)?