Forums Register Login

Invalidate session

+Pie Number of slices to send: Send
Hi,

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.

Dhara.
+Pie Number of slices to send: Send
Closing the window does not expire the session, so you can't detect that.

With a session listener you can determine when the orphaned session times out.
Pay attention! Tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1375 times.
Similar Threads
need to update logout details into database when client machine shutdown
How to ristrict multiple login's at the same time using same username?
JSP login/logout session problem
logout from page with frames
Session problem or the browser problem?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:50:09.