aspose file tools*
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
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: 16305
    
  21

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