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 Java 8 in Action this week in the Java 8 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: 1506
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: 12682
    
    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


Java Resources at www.wbrogden.com
 
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)?
 
Similar Threads
Ending a "specific" session
Session Tracking
What is in the Session?
Urgent Please : Whether WAS 4.0 supports Servlet 2.3 API ?????
Is it possible to create more than one HttpSession in our Application