Well, I'll take a wild stab at it since I don't know Java Server Faces, but
since you say it was working and now has stopped. Do you have
<sessions-enabled>true</sessions-enabled> in your appengine-web.xml? If not,
add it. As of 1.4 this is now being adhered to whereas prior to this
sessions were enabled regardless. So perhaps even with sessions not enabled
you are able to get a session object from the servlet context for that
initial request but the appengine isn't saving state to the datastore so the
next request gets told that the requested session identifer is not
valid/expired.

On Tue, Dec 7, 2010 at 12:50 PM, Nick Belaevski <mika...@gmail.com> wrote:

> Hello all,
>
> I've suddenly stuck with JavaServer Faces application stopped working at
> GAE. Investigation shows that view state is not being stored in session
> correctly.
> What I also found out is that when the first request is being done (i.e.
> with clean session), ajax requests are working; but when another view is
> requested, ajax is not working there anymore. I assumed this is because
> updated view state is not being stored, and tried to make a slight change:
>
> a)  as is:
>
> Map statesMap = session.get("state");
> if (statesMap == null) {
> statesMap = new HashMap();
> session.put("state", statesMap);
> }
>
> statesMap.put("...", state);
> //force update in cluster
> session.put("state", statesMap);
>
> b) with the slight change:
> Map statesMap = session.get("state");
> if (statesMap == null) {
> statesMap = new HashMap();
> session.put("state", statesMap);
> }
>
> statesMap.put("...", state);
> //force update in cluster
> session.remove("state");
> session.put("state", statesMap);
>
> However the solution is not very good, so can please someone help with the
> problem?
>
> P.S. Runnable demo example is available here:
> http://java.net/jira/browse/JAVASERVERFACES-1886
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to