You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yi Kuang Niu <de...@gmail.com> on 2021/09/25 08:48:29 UTC

How can I set the version of sessionId cookie which tomcat send to the client to 0?

As is known,when the client accesses the server, the server will create a session and send the sessionId (in the form of cookie) to the client.But these days,I met a problem.I found the IE11 browser doesn’t support cookie if the cookie version is 1.In client side,every time a new request is sent to the server,tomcat will always set a new sessionId as cookie.But when I simulate manually as tomcat to send the sessionId(cookie version is 0) to client in IE11,the session works well,and the problem above didn't exist.Therefore,how can I set the configuration of tomcat to ensure it will always send the version 0 cookie of sessionId to client?
I would be much grateful if you could help me solve this problem.Looking forward to hearing from you!

Re: How can I set the version of sessionId cookie which tomcat send to the client to 0?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Kuang Neu,

On 9/25/21 04:48, Yi Kuang Niu wrote:
> As is known,when the client accesses the server, the server will create a session and send the sessionId (in the form of cookie) to the client.But these days,I met a problem.I found the IE11 browser doesn’t support cookie if the cookie version is 1.In client side,every time a new request is sent to the server,tomcat will always set a new sessionId as cookie.But when I simulate manually as tomcat to send the sessionId(cookie version is 0) to client in IE11,the session works well,and the problem above didn't exist.Therefore,how can I set the configuration of tomcat to ensure it will always send the version 0 cookie of sessionId to client?
> I would be much grateful if you could help me solve this problem.Looking forward to hearing from you!

Could this be your issue?

https://stackoverflow.com/a/34766660/276232

If not, maybe you can give us some more information?

- Tomcat version
- Contents of cookie which is ignored
- URL you are trying to access (specifically, protocol and whether the 
hostname matches any domain that might be a part of the cookie)

I'm using Tomcat 8.5 and I don't get a v1 cookie. I get:

Set-Cookie JSESSIONID=[id]; Path=/context; HttpOnly; SameSite=Lax

I have manually set SameSite=Lax due to my own requirements. No version. 
No domain. Nothing funny.

Does anybody really use MSIE 11?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


AW: How can I set the version of sessionId cookie which tomcat send to the client to 0?

Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
Hello,


Could you tell which version of Tomcat you are using?

I can't seen any version number in the response header.


Have you configured the legacy cookie processor within your context element?
https://tomcat.apache.org/tomcat-8.5-doc/config/cookie-processor.html
Try to remove the LegacyCookieProcessor.


Greetings,

Thomas


________________________________
Von: Yi Kuang Niu <de...@gmail.com>
Gesendet: Samstag, 25. September 2021 10:48
An: users@tomcat.apache.org
Betreff: How can I set the version of sessionId cookie which tomcat send to the client to 0?

As is known,when the client accesses the server, the server will create a session and send the sessionId (in the form of cookie) to the client.But these days,I met a problem.I found the IE11 browser doesn’t support cookie if the cookie version is 1.In client side,every time a new request is sent to the server,tomcat will always set a new sessionId as cookie.But when I simulate manually as tomcat to send the sessionId(cookie version is 0) to client in IE11,the session works well,and the problem above didn't exist.Therefore,how can I set the configuration of tomcat to ensure it will always send the version 0 cookie of sessionId to client?
I would be much grateful if you could help me solve this problem.Looking forward to hearing from you!