File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes clarification : HFS page 266 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "clarification : HFS page 266" Watch "clarification : HFS page 266" New topic

clarification : HFS page 266

harsha madiraju

Joined: Dec 20, 2004
Posts: 10
Hi all,

I need some clarification in HFS mock exam in page 266,Question 3, Option A

The option says "A session whose timeout period has been set to -1 will never expire"

Does it mean that even if the user closes the browser, session does'nt expire??

Pls clarify

Thanks in advance

Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 951
As per the servlet specs., if the time-out period for a session is set to -1, the session will never expire. In the HTTP protocol (Stateless) , there is no explicit termination signal when a client (browser) is no longer active. The session can be terminated by setting timeout period or explicitly invalidating the session. Even in some browser, you can use same session in two different windows. When one window is closed, the session remain active in another window.


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Nidhin Kannan

Joined: Oct 13, 2003
Posts: 4
If the session timeout is set to -1, the server will not end the session. Meaning that even if the user closes the browser and comes back and goes to the same page. If the timeout period of the session on that server has not elapsed, the user will be able to log into the site automatically, without any login parameters.
Unless ofcourse, ur page is intelligent enuff to trap a browser close event and send signal to the server to flush session and so, ask user to relogin at the time of coming back to the site.
In case of sites like yahoo if u accidentally close your browser and come back to the site, it takes you to the email access page. this is assuming that the session timeout hasnt happened yet.
BreakThru NOT BreakDown!
I agree. Here's the link:
subject: clarification : HFS page 266
It's not a secret anymore!