I am trying to set a cookie with value unkown#4?Wn5pZ1JwQnlLEGRJAgB4WQU%3D in Servlet response.
But when I set the cookie in browser it is returned with quotes surrounding it like this:
"unkown#4?Wn5pZ1JwQnlLEGRJAgB4WQU%3D".
Why is this happening? We are using Jetty as application server.
I will put code which I have written
String cookieValue = "unkown#4?Wn5pZ1JwQnlLEGRJAgB4WQU%3D";
Cookie zedoCookie = new Cookie("cookiename", cookieValue);
zedoCookie.setMaxAge(31536000); // this is one year duration.
zedoCookie.setDomain("somedomain.com");
zedoCookie.setPath("/");
response.addCookie(zedoCookie);
Can someone put some light on this?
I have already had a look at this. But it does not seem to address my issue.