Home  >  Forum  >  JSF
Post New Query

javax.faces.application.ViewExpiredException: viewId: could not be restored

joined on
March 27,2014
Asked on January 17,2015
What causes below error, I am getting this error sometimes in my application.

javax.faces.application.ViewExpiredException: viewId: could not be restored.
com.sun.faces.lifecycle.RestoreViewPhase.execute(Unknown Source)
com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
javax.faces.webapp.FacesServlet.service(Unknown Source)
joined on
March 14,2013
Replied on January 17,2015

By default, JSF saves the state of view in servlet session. If our JSF view page is inactive from long time and if trying to access view state from session, it may possible that session is expired. Then exception will be thrown javax.faces.application.ViewExpiredException.

To avoid this exception, we should save view state in client side by setting below configuration.


Setting this, view state will be saved in hidden field in client side.

Write Answer

Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us