When does app engine set the cookie JSESSIONID

224 views
Skip to first unread message

b...@soliduslink.com

unread,
Jun 6, 2018, 9:03:53 AM6/6/18
to Google App Engine
Hi,


According to this post. The App Engine set the cookie JSESSIONID after request.getSession() is called. But when exactly? Is it done by a internal filter?

What if I set the JESSIONID myself right after a new session is created? Will App Engine try to overwrite my cookie or it will just skip creating one?

Best,
Baojun

Katayoon (Cloud Platform Support)

unread,
Jun 6, 2018, 4:47:14 PM6/6/18
to Google App Engine
The App Engine only provides the content for your app using Jetty. Session gets created when you call request.getSession() for the first time and consequently JSESSIONID cookie is created when the session is created. Hope this explanation works for you?

Baojun Xu

unread,
Jun 11, 2018, 4:31:33 AM6/11/18
to google-a...@googlegroups.com
Good to know that JSESSIONID cookie is created by Jetty. Is there a way to add a HTTPONLY flag on this cookie? I tried to add the JSESSIONID cookie right after the request.getSession() method manually. Do you think it would be overwritten by jetty?

On Wed, Jun 6, 2018 at 10:47 PM, 'Katayoon (Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:
The App Engine only provides the content for your app using Jetty. Session gets created when you call request.getSession() for the first time and consequently JSESSIONID cookie is created when the session is created. Hope this explanation works for you?

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/8d2af3bc-a494-4eee-9e91-f4d52c50c6bc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Baojun Xu

SolidusLink AG
Rütistrasse 16
8952 Schlieren

Katayoon (Cloud Platform Support)

unread,
Jun 11, 2018, 3:58:42 PM6/11/18
to Google App Engine

You can add it by implementing a filter. Here, you may find a sample on how to implement a security filter which can be applied for HttpOnly similarly. For any question on Jetty, I recommend that you post your question in the respective community group.


Baojun Xu

unread,
Jun 11, 2018, 7:01:10 PM6/11/18
to google-a...@googlegroups.com
I do have a filter for this purpose. It's configured in the method configureServlets(). Is it any different than configuring it in web.xml?

On Mon, Jun 11, 2018 at 9:58 PM, 'Katayoon (Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:

You can add it by implementing a filter. Here, you may find a sample on how to implement a security filter which can be applied for HttpOnly similarly. For any question on Jetty, I recommend that you post your question in the respective community group.


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.

For more options, visit https://groups.google.com/d/optout.

Katayoon (Cloud Platform Support)

unread,
Jun 13, 2018, 12:56:55 PM6/13/18
to Google App Engine
I recommend that you post your full detailed question to Stack Overflow since Google Groups are reserved for general Google Cloud Platform-end product discussions and not for technical questions.
Reply all
Reply to author
Forward
0 new messages