In my web app i am setting response cookies this way:
Cookie testCookie = new Cookie("test", "mycookie");
testCookie.setHttpOnly(true);
testCookie.setPath("/");
testCookie.setMaxAge(3600);
testCookie.setSecure(true);
response.addCookie(testCookie); // Response is of type HttpServletResponse
The client that is performing the requests is running in localhost.
When i look at the request in chrome, i see that cookie tab and see that the cookie was received but I cannot find this cookie in chrome when i look in the Application->Cookies tab and the other requests i do after this was done, do not send cookies.
Also, in jetty 11 i cannot seem to be able to set the SameSite attribute of the cookie.
How can i set this cookie and is it normal that an httpOnly cookie is not visible in the Application tab in chrome? How can i verify if it was set or not?
EDIT: Additional details I am running the client in https://localhost and the server is using https with a self signed certificate. The cookie i am receiving seems corect from the response but then chrome does not seem to save it.