• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invalidate session

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic