I want to create cookie which contains special char. I have tried many solutions but it remains same. It means that it automatically deletes the values after special char.
json = [{"message":"D10QAC"},{"message":"D10P;F"},{"message":"D10PAF"}]
Cookie cookie = new Cookie("cookie", json);
cookie.setMaxAge(10000);
response.addCookie(cookie);
But when the cookie is stored is like [{"message":"D10QAC"},{"message":"D10P;
I also tried to decode this cookie by using URLEncoder.encode(json, "UTF-8")
but it also have same problem.
Any help ? Thanks in advance.