How do I enable session support in Google App Engine (Java)?

元气小坏坏 提交于 2019-12-19 20:11:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!