• 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

Handling session timeout and session invalidate differently

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Sheriff
Posts: 67749
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
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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe, using HttpSession.getLastAccessedTime() and HttpSession.getMaxInactiveInterval() APIs you may be able to acheive the needful.
reply
    Bookmark Topic Watch Topic
  • New Topic