File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

state of session object after timeout

 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
could someone please let me know, what would be state of the session object once it is timed out.
Will it be null?
If I do operation session.getAttribute("KEY"), what I'll get if this is done on the timed out session.
Thanks
Sanjeev Kaushik
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it will be null.
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the exception I am getting, I understand that session object is not null. If I get something out of session, that is returned null.
Can someone verify.
Sanjeev Kaushik
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If session times out and you call
1 .request.getSession() or request.getSession(true) a new session will returned
2. request.getSession(false) will try to get old session .The old session has timed out so the return value will be null.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic