myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject RE: Problem Using Orchestra with Realm after Session-Timeout
Date Thu, 12 Feb 2009 10:42:52 GMT
> -----Original Message-----
> From: Filip Lyncker []
> Sent: Thursday, February 12, 2009 11:29 AM

Yep, here it is:
> javax.faces.application.ViewExpiredException:
> viewId:/pages/start/actuell.jsf - View /pages/start/actuell.jsf could
> not be restored.

>                 if (is11CompatEnabled(facesContext)) { // the faces

What you can do ist to figure out how to enable the JSF 1.1 compat mode, which then will simply
rerender the page.
Or you try/catch the ViewExpired exception in an filter (probably) and forward to your login/menu/whatever

The first suggestion might restore the page in an invalid state as all the beans are gone,
so I'd opt for the second suggestion (try/catch).
Unhappily I've never done this myself (... I should have ...). I'd start with a servlet filter
.. or a PhaseListener.

Anyone else with a better solution?

Yes, a third one: If you are using richfaces you can use the a4j:poll component on each page
which polls the server, lets say, once every minute. This will prevent the session from timeout
as long as the browser points to your application. This also allows you to configure a very
short session timeout (5 minutes) as nothing bad happens as long as the browser is open. This
is very much like a RichClient behaviour.
BTW: This is the solution we use in our application.


View raw message