GAE + JSF : View /hello.xhtml could not be restored
Problem
Deployed on GAE production environment, when navigate from one page/view to another page/view, GAE shows error message “View xxx could not be restored“?
- JSF 2.1.7
- Google App Engine SDK 1.6.3
P.S No problem at local GAE development.
Solution
By default, JSF 2 is using server for session management, and it’s not supported in GAE (tested with 1.6.3). To solve it, update web.xml file, define “javax.faces.STATE_SAVING_METHOD
” , put value as “client“.
File : web.xml
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
Hello, Thanks for you answer, Please what about JSF 1.2
Not working. still getiing error viewid:/hello.xhtml – view /hello.xhtml could not be restored. in web IDE
Hi mkyong,
Thanks for the information but, after that change, we receive the error:
: ERROR: MAC did not verify!
Is there any solution for that?