Consider the following scenario. I am clicking the submit button of a JSF form, after the session has timed out(expired). The browser displays some exception message:
ViewExpiredException: view context could not be restored
What I want to do is, to automatically redirect to the homepage of the website after the session has expired. What is the mechanism to do this? Any help would be much appreciated.
<error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/index.xhtml</location> </error-page>
Still i get the exception from the glassfish server.HTTP Status 500 - **type** Exception report **message** **description** The server encountered an internal error () that prevented it from fulfilling this request. **exception** javax.faces.application.ViewExpiredException: viewId:/home.xhtml - View /home.xhtml could not be restored
any suggestion pls? – Gabriellegabrielli