Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Simple question about cookies

Hello all,

I am using Jetty 9.3 (embedded) and have very little experience with explicit cookie management. Now I am doing some basic testing and one thing strikes me as odd:

I use HttpServletResponse#addCookie to add a cookie. On that cookie I have set the following attributes:

When I check my browsers (Chromium and Firefox) they display the cookie with all the expected attributes. There is a dot-sign in front of the domain but for the rest all attributes seem to match.

On subsequent requests I use HttpServletRequest.getCookies to retrieve the cookie. There is a cookie with the expected name and value present but for some reason the domain and path attributes are missing.

Since both browsers behave exactly the same I think this is either expected behavior (be it not expected by me) or there is something wrong.

Are there any Jetty settings that might influence this behavior?

Thanks in advance.



Back to the top