File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 12760
    
    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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Are there any ways to retrieve HttpSession object by SessionID (Servlet API 2.3)?
 
Similar Threads
Session Tracking
What is in the Session?
Ending a "specific" session
Urgent Please : Whether WAS 4.0 supports Servlet 2.3 API ?????
Is it possible to create more than one HttpSession in our Application