This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am working on web application using struts, JSP technology. Anybody can help on the following?
1. In my web application, I have logout button. When user will click on logout button, session is going to be invalidated. Related that, I have one field by name 'SITACD' into Database. 2. Default value of 'SITACD' field is '0'. 3. When user will login into application, I am making that field's value 'SITACD=1' to keep track, whether user has been logged in or not.
4. If ohther user will try to login by same id, then firt I m checking, whether 'SITACD' value is 1, if it's 1, then should not allow to login by same id.
5. When user will click on 'logout' button, this field's value will become '0' again.
Problem : If user will dierectely close browser, session will be automatically expired. But how to set this field 'SITACD' 's value to '0'.
How to identify, if session is expired by closing the window directely.
If anybody can help me in this, it would be very helpful to me.