No saved view state could be found for the view identifier解决方法

运行jsf页面出现javax.faces.application.ViewExpiredException - /*.jsp No saved view state could be found for the view identifier: /*.jsp问题的解决方法
 
出现此问题的原因我也不是太清楚,看了相关资料说是因为session的保存时间造成了。所以下面的两个方法都是针对时间来修正。
在web.xml中新增下列节点

方法1.   

View Code
1  <web-app>
2 <context-param>
3 <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
4 <param-value>true</param-value>
5 </context-param>
6 </web-app>
方法2.
  增加保存时间为600分钟
View Code
1  <web-app>       
2 <session-config>
3 <session-timeout>600</session-timeout>
4 </session-config>
5 </web-app>

 
 
原文地址:https://www.cnblogs.com/enum/p/2334079.html