This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes How to handle session expired with JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to handle session expired with JSF" Watch "How to handle session expired with JSF" New topic
Author

How to handle session expired with JSF

rashmi coorg
Greenhorn

Joined: Jul 11, 2011
Posts: 19

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

Joined: Jun 25, 2001
Posts: 15962
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
rashmi coorg
Greenhorn

Joined: Jul 11, 2011
Posts: 19
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to handle session expired with JSF
 
Similar Threads
login example using jsf
help with jsp redirection after timeout
Redirect to login in ajax...
Keep the user signed in even after browser closes
BACK BUTTON CHECK