Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what does session invalidate means?  RSS feed

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


OUTPUT



Shoudnt it print null second time ???
[ February 23, 2007: Message edited by: Bear Bibeault ]
 
Subhadip Chatterjee
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jigar,
if you go through SUN's API spec for HTTPSession, this will say you what i am quoting below:
"Invalidates this session and unbinds any objects bound to it.". This means all the objects, set in the Session, will be cleared off. But this doesn't mean that Session is destroyed. Only that Browser doesn't allow the session to be an active one. So, still you will get a session id.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The session object is simply not useful anymore thats all. And yes the objects that were bound are now unbound. You can use the getSession() method in the request object and compare the IDs, old and new
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!