views:

41

answers:

2

Hi,

I have this code that works just fine on the development server but when I deploy the application, the session isn't created. What am I doing wrong?

HttpSession session = req.getSession(true); session.setAttribute("loggedIn", new String("true"));

Edit:

The sessions are enabled. What I realized now is that the _ah_SESSION variable is not being created, not even on the development server (although it works).

A: 

Did you enable sesssion in APE. See instructions here,

http://code.google.com/intl/en-US/appengine/docs/java/config/appconfig.html#Enabling_Sessions

ZZ Coder
yes, they are enabled.
grep
What else can it be? Do I need to "save" it or something?
grep
A: 

Here is how you can get the session in GAE:

this.getThreadLocalRequest().getSession();
Romain Hippeau