If you write :
RequestToken requestToken = (RequestToken)this.getThreadLocalRequest
().getSession(true).getAttribute("RequestToken");
you force HttpServletRequest to create a new Session. Use getSession(false)
or getSession() instead, to get the current valid session associated. When
no parameter is passed to the method, if necessary, a new session is
created.
Regards.
--------------------------------------------------
From: "Stream" <[email protected]>
Sent: Sunday, August 30, 2009 1:47 PM
To: "Google App Engine" <[email protected]>
Subject: [google-appengine] app engine + java + session
>
> I enabled sessions in my app engine, however the data isn't being
> persisted across requests... am I missing something here?
>
> I use this to write:
> this.getThreadLocalRequest().getSession(true).setAttribute
> ("RequestToken", requestToken);
> and this to read:
> RequestToken requestToken = (RequestToken)this.getThreadLocalRequest
> ().getSession(true).getAttribute("RequestToken");
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---