This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
1 in a web application,if a user closed his browser(platform is windows),does his session that in server is expired? 2 if he not close the browser ,but navigator to another page that no relationss with this web application . does his session that in server is expired? 3 if above two not come into existence,is there any method that let session expire when user closed browser or navigator to another page?? thanks a lot
Hi, 1. If the user closes the browser , his session in that server is expired. 2. No his session in the server is not expired if he navigates to another page that has no relationss with this web application 3. With respect to answer 2, you cannot expire the session by opening a new browser window without closing the existing window,since the server does not know this since it is the client side activity.
han, Please change your name to be compliant with JavaRanch's naming policy. It should not be obviously fictitious. Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name. You can change your name: here. Thanks, Cindy
"JavaRanch, where the deer and the Certified play" - David O'Meara
1. Not exactly - his cookie that relates to the session is lost by the browser but the actual session object stored on the server is not invalidated until the servlet engine timeout is hit. The subject of how to detect that a user has "left the site" has been discussed numerous times here - dig around in the archives. Bill
subject: if browser is closed,does session expire?