I tested by browsing to the login page, then killing JBossAS and
restarting it (same effect as session timing out) yet still get the same
exception. My web.xml has the following entry:
<context-param>
<param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
<param-value>true</param-value>
</context-param>
Here's the stack trace. I checked the version of Facelets that we have
in Seam and it's 1.1.15.B1.
javax.faces.application.ViewExpiredException: viewId:/home.seam - View /home.seam could
not be restored.
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:150)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:379)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:506)
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Dan Allen wrote:
This feature was added in Facelets 1.1.12 according to this URL:
http://sfjsf.blogspot.com/2006/03/facelets-112-is-out.html
To test this feature, set the session timeout to 1 minute, visit the
login page, and go grab a cup of coffee (yes, there are other ways,
but this is the real world test). When you get back, try to use the
login page. You should see that you can successfully login even though
the session is dead and the previously rendered login view cannot be
found during postback.
-Dan
On Sun, Sep 7, 2008 at 8:01 PM, Shane Bryzak <shane.bryzak(a)jboss.com> wrote:
> Is this a recent change to Facelets? I tried this in the seamspace example
> and still got the "View /home.seam could not be restored" exception.
>
> Dan Allen wrote:
>
>>> You simply set the context parameter PARAM_BUILD_BEFORE_RESTORE
>>> to true.
>>>
>>>
>> Correction. I provided the name of the constant in the Facelets API.
>> The parameter name is facelets.BUILD_BEFORE_RESTORE. The context
>> parameter configuration is shown below:
>>
>> <web-app ...>
>> ...
>> <context-param>
>> <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
>> <param-value>true</param-value>
>> </context-param
>> </web-app>
>>
>> -Dan
>>
>>
>>
>
>