问题
How do I enable GAE session support using Java?
Also, a related question: I only want to store a small amount of state in sessions (basically, just a key) -- will GAE store this information in a client-side cookie, and if so, how secure is that approach?
Thanks!
回答1:
For the first question. In your appengine-web.xml have:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
...
<sessions-enabled>true</sessions-enabled>
</appengine-web-app>
回答2:
Please refer this Link provided by in comments in appengine-web.xml:
http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions
来源:https://stackoverflow.com/questions/4343206/how-do-i-enable-session-support-in-google-app-engine-java