Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session management  RSS feed

 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My knowledge of how JSF handles users session is not great, so excuse the potential stupidity of this question... I'm working on my first JSF app, and
so far it seems to be going okay. One thing I have noticed is that once a users session has expired and they attempt to access a page that references session data, the app basically keels over rather than booting them out to the login page. Should JSF be handing the session management or is it something I need to code for?

Kev.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF doesn't provides and it doesn't needs probably as it is built over Servlets.
You can use HttpSessionListener etc. to manage it. Check out servlet specs.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As KV said, JSF doesn't handle any Session management. What I do is use a Servlet Filter that all requests go through. This filter checks and makes sure that a) the session is valid and b)the user has privaliges for the requested page.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Filers is probably the better option.

If I am not wrong, HttpSessionListener;s sessionDestroyed() method listens only to session.inValidate() calls.
[ February 01, 2005: Message edited by: K Varun ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!