[ 
https://issues.apache.org/jira/browse/MYFACES-3598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446969#comment-13446969
 ] 

Bernd Bohmann commented on MYFACES-3598:
----------------------------------------

An other solution would be to redirect to the index.xhtml after invalidating 
the session with:

FacesContext.getCurrentInstance().getExternalContext().redirect("index.xhtml");
FacesContext.getCurrentInstance().responseComplete();


                
> ViewExpiredException during logout after the 3rd login
> ------------------------------------------------------
>
>                 Key: MYFACES-3598
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3598
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.1.8
>         Environment: Tomcat  6.0.35 / 7.0.29
>            Reporter: Michael Heinen
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.15, 2.1.9
>
>         Attachments: MYFACES-3598-1.patch, viewExpired.war
>
>
> We have a simple webApp with 2 views.
> The first view (login screen) contains a non ajax button which navigates to 
> the second view.
> The second view contains a non ajax button (logout) which invalidates the web 
> session and navigates back to the first view.
> A ViewExpiredException occurs with myfaces if these steps are executed 
> exactly 3 times (logn followed by logoutand logout action)
> The ViewExpiredException occurs in restore view during the 3rd logut action.
> The ViewExpiredException does not occur if the web session is not invalidated 
> in the logout action!
> Config:
> javax.faces.STATE_SAVING_METHOD=server
> javax.faces.PARTIAL_STATE_SAVING=false
> org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION = 2
> org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION = 2
>   
> The ViewExpiredException does not occur with mojarra 2.1.12 with 
> com.sun.faces.numberOfViewsInSession and com.sun.faces.numberOfLogicalViews 
> both set to 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to