Or better yet, use a phase listener (see Bergsten’s book) to detect an expired user id and automatically direct the user to the login page.  

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken
Sent: Sunday, September 25, 2005 7:44 PM
To: MyFaces Discussion
Subject: Re: Session expired

 


Assuming user logged in with an id, you could save this value as a property in your managed bean in session scope.  Then, you can see if session is expired by to checking if this property is null or empty.

On 9/25/05, Dave <[EMAIL PROTECTED]> wrote:

How to identify expired session so that I can show a message to tell user that session is expired and need to login in again? If I check if session is null, I can not tell whether the session has not been created or expired.  All data are kept in session scope, if a session is expired, all data lost. So I can not tell if the user has ever logged in. In JSF, what is the best way to do this? Thanks for help.


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

 

Reply via email to