How do I enable session support in Google App Engi

2019-02-22 08:23发布

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!

2条回答
你好瞎i
2楼-- · 2019-02-22 08:54

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>
查看更多
We Are One
3楼-- · 2019-02-22 09:08

Please refer this Link provided by in comments in appengine-web.xml:

http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions

查看更多
登录 后发表回答