Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to handle session expired with JSF

 
rashmi coorg
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I use JSF 1.2 and richfaces 3.3 in my application. I have 2 different login pages. Suppose the user logs in through one of the login page and if the session expires, i have handled it through viewExpiredException in web.xml. I display a page where the user will be notified that the session is expired and is asked to click on a link to go to login page. When the user clicks on the link, i need to redirect the user to the same login page where he logged in. Please suggest me how can i know that the user has logged in from which login page.?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're doing your own login code instead of using what J2EE provides, you're already in trouble, but I'll skip the rant.

View Expired and Session Expired are two very, very different things. A view may expire without the session being expired - meaning that the user is still logged in. I suppose the reverse is true, although a View referencing an expired session might have problems of its own.
 
rashmi coorg
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am invalidating the session when the view expires. That way session expired is handled. But is there any way i can have solution to my problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic