This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session invalidate

 
T Madhavi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Session will be invalidated after a time-out period defined by Servlet Container" - From HFSJ
I know session can be invalidated by invalidate(), or specifying time-out in DD or if the browser crashes. But what is meant by time-out defined by servlet container ? is it a default value specified in servlet container?
 
Saurabh Kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, "time-out defined by servlet container " is the default value for session timeout defined by the container.

Most of the containers let you set this default timout period(I am sure of WebSphere atleast).

Thanks and regards,
Saurabh
 
Darren Weaver
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the browser crashes, that does not invalidate your session. You may not be able to get back to the session because you lost the cookie holding the session id, but technically your session is still active until it times out.
 
T Madhavi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies.
 
Arun Kumar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like this javaranch page if you close the browser it still logs you in!!
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

And what if i have defined the session-timeout in the DD ? The one defined in the DD will be used instead of the Container's default one right ?

Please clear my doubts, thank you ...
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Yes, The time interval defined in the DD will be used instead of the Container's default one right. Also You can set the inactive interval by the session method setMaxInactiveInterval(int interval) programmatically.

In DD we define interval in minutes whereas in the above method the time interval is in seconds.

Thanks
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool

Thanks alot ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic