javax.faces.application.ViewExpiredException: viewId: could not be restored
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.
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.