I have a question regarding my Seam 2.2.2 Web App using JSF 1.2 / Richfaces 3.3.3
To handle session timeout I am using the following in my pages.xml...
<exception class="javax.faces.application.ViewExpiredException" log="false">
<end-conversation/>
<redirect />
</exception>
So that if a user is not logged in, the page is just refreshed, and if they are logged in they will be bounced back to our login page (due to another redirect rule)
Also config in web.xml
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
<param-value>Mojarra-1.2</param-value>
</context-param>
This works fine and does the job but the problem I am have is if the session expires and the user tries to perform an ajax update (eg. click a4j:commandButton / a4j:commandLink) then the following exception is thrown:
2014-01-22 21:46:23,326 SEVERE [javax.enterprise.resource.webcontainer.jsf.lifecycle] (ajp-0.0.0.0-8009-11) JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@10fd6ac]
The user is still redirected ok so they dont actually see anything bad happen but I still get the SEVERE error being logged. I know I could suppress the error but I want to see if there is a way to catch it / prevent it being thrown.
Any suggestions?
Thanks