Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Graceful session timeout handling  RSS feed

 
Chris Stewart
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've started to notice an error in my JSF application when the session timeout limit occurs. In my case, there is nothing crucial in the session that requires invalidation. So by putting "0" as the timeout value, will that keep my session going until the browser is closed?

Also, is there an suggested path to take in this regard? I haven't found much related to this.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could create a ViewHandler that checks whether a timeout has occured (session.isNew()) and if so, redirect the user to the login page with a nice error message.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!