• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Handling session timeout and session invalidate differently

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Ranchers,

In my application i am using spring web flow, JSF (richfaces). I have a doubt and that is how can i differentiate between session timeout and a call to session.invalidate().

Because in case of session time out i want to redirect user to a Page A and in case user logs out of application i am invalidating the session and want user to redirect to login page.

Any pointer how can i achieve this because i am not able to handle session timeout and call to session.invaidate() differently.

 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you are the one invalidating the session, you can take whatever action you want afterwards. There's no need for detection as you know when you are invalidating the session.
 
Ranch Hand
Posts: 312
MS IE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe, using HttpSession.getLastAccessedTime() and HttpSession.getMaxInactiveInterval() APIs you may be able to acheive the needful.
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic