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" <streamofc...@gmail.com> Sent: Sunday, August 30, 2009 1:47 PM To: "Google App Engine" <google-appengine@googlegroups.com> 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 google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---