Do you know any Java cookie implementation which allows to set a custom flag for cookie, like SameSite=strict
? It seems that javax.servlet.http.Cookie has a str
I tried the listed solutions for using javax.servlet.http.Cookie to set the SameSite=strict
attribute, but none of them worked.
However, this way worked for me, using javax.servlet.http.Cookie (JRE 1.8 + JBOSS 7.X) :
Cookie cookie = new Cookie(name, value);
path = path.concat("SameSite=Strict;");
cookie.setPath(path);
That's it. tested on