Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 704
Tony the Pony Avatar asked Dec 03 '10 06:12

Tony the Pony


People also ask

What are the programming supports of Google App Engine?

Source code is written in specific versions of the supported programming languages: Python 2.7, Python 3.7, Python 3.8, Python 3.9, and Python 3.10. Java 8, Java 11, and Java 17. Node.

Does Google App Engine support containers?

Features. Customizable infrastructure - App Engine flexible environment instances are Compute Engine virtual machines, which means that you can take advantage of custom libraries, use SSH for debugging, and deploy your own Docker containers.

Which of the following command helps to create an App Engine app within the current Google Cloud project?

The current Google Cloud project does not contain an App Engine application. Use `gcloud beta app create` to initialize an App Engine application within the project.


2 Answers

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>
like image 89
hleinone Avatar answered Sep 28 '22 14:09

hleinone


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

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

like image 42
Meher Avatar answered Sep 28 '22 16:09

Meher