File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URGENT DOUBT 1 --- SESSION HANDLING

 
sanjay sawant
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please this is very urgent.
I need all the help that anyone can give...
public void logout(String login_name,HttpServletRequest req)
{
if(req.isrequestedSessionIdValid())
{
req.getSession().invalidate();
allSessionsHashtable.remove(login_name)
}
}

As soon as users log into the application
i am calling login method of a singleton class
i create session and
store login_name and corressponding sessions
Since multi-login is also allowed it is possible that before the user presses logout button the
session is invalid.
Will above method -logout() work properly
Is req.isrequestedSessionIdValid()
reliable and will this code act the way i want.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic