aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes session invalidate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "session invalidate" Watch "session invalidate" New topic
Author

session invalidate

T Madhavi
Greenhorn

Joined: Apr 19, 2007
Posts: 10
"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

Joined: Aug 21, 2006
Posts: 56
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

Joined: Apr 30, 2007
Posts: 7
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

Joined: Apr 19, 2007
Posts: 10
Thanks for the replies.
Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
Just like this javaranch page if you close the browser it still logs you in!!
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
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 ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
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


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Cool

Thanks alot ...
 
Don't get me started about those stupid light bulbs.
 
subject: session invalidate