7

I have problem which I cannot solve. When I refresh opened JSF page after the page is idle for example 10 minutes I get this error message:

serverError: class javax.faces.application.ViewExpiredException viewId:/page.jsf - View /page.jsf could not be restored.

How I can increase the JSF View time?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

1 Answers1

19

You can set your session timeout parameter to 45 minute in web.xml like this

<session-config> 
   <session-timeout>45</session-timeout> 
</session-config>

also you can easily handle this exception in a seperate page by adding following code to your web.xml

<error-page>
    <exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/exception/sessionexpired.xhtml</location>
</error-page>
Kerem Baydoğan
  • 10,475
  • 1
  • 43
  • 50