• 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

Sessions

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends ,
I have to implement session handling. What my doubt is ,I want the session to expire when the user click the back button on the browser.
How do I go for it . Please help
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is really more a question for the Servlets/JSP forum, so I've moved it.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is not clear,may be from whatever i got after reading I think this can be done using some method like invalidate() in HttpSesion Class or try using removeAttribute() or removeValue().
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what I think...You dont ever know when the browsers back button is pressed so I dont think you can accomplish your goal that way. You may want to track the users navigation of the site in the session and once he visits a page you can check the session to see if he has visited it. If he has then you can do whatever it is you want to do (invalidate the session).
best of luck
paul
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai

your question is not clear
as far as i know u can use the method HttpSession.invalidate()
to invalidate a session
else use HttpSession.removeValue(String st) - to remove objects bound to a specified name
 
reply
    Bookmark Topic Watch Topic
  • New Topic