[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2767) Redirect the user to the last page he left when the session expires

Lijun Yan (JIRA) jira-events at lists.jboss.org
Wed Mar 19 12:27:56 EDT 2008

Redirect the user to the last page he left when the session expires

                 Key: JBSEAM-2767
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2767
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Security
    Affects Versions: 2.0.1.GA
            Reporter: Lijun Yan

The business scenario here is: When a user attempts to access a page and the session has timed out, he is redirected to the login page with a message explaining that he need to log in again. After the user completes the log in, he should be redirected to the last page where he tried to interact.

We didn't find any built-in Seam configuration could help with this requirement. So we implement it programmatically. We save the last view id to the Cookie when session times out, and then recover the last view id when the user re-logs in.

We are wondering whether there is any Seam component we could take advantage of. With the coming org.jboss.seam.sessionExpired event (http://jira.jboss.com/jira/browse/JBSEAM-2257), can we do something like:

<event type="org.jboss.seam.sessionExpired">
     <action execute="#{redirect.captureCurrentView}"/>
 <event type="org.jboss.seam.postAuthenticate">
     <action execute="#{redirect.returnToCapturedView}"/>

I tried this setting now, with the sessionExpired event developed as Jacob's blog (http://solutionsfit.com/blog/2007/11/16/session-expired-messages-using-seam-security/), the error is:

2008-03-18 16:33:51,313 ERROR *http-8080-2* SeamPhaseListener.beforePhase:120 [] uncaught exception
javax.el.PropertyNotFoundException: Target Unreachable, identifier 'redirect' resolved to null

We also have question about how the conversation plays in this redirection. For example, the session expires when the user is at some results page, when he re-logs in, how to keep all the result data on that page and other states? Basically how to save and replay a conversation? 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list