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“?

  1. JSF 2.1.7
  2. Google App Engine SDK 1.6.3
view can not be restored view can not be restored

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>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s