Reputation: 33
I want to create a cookie that it's value contains many ";" characters that is usually used to separate multiple cookies in java, that's why my code isn't making his job. if someone can help me how to create this "special" cookie and make my code work? thanks.
Upvotes: 3
Views: 5225
Reputation: 5205
You can use URL encoding to escape any special characters (+
, %
, =
, ;
).
The URL encoded value of ;
is %3B
.
For a better reference, check out the Java JSON API.
Upvotes: 5
Reputation: 35405
Semicolon is not allowed in cookies. Your best shot is to use some other separator. Read the linked answer to figure out what character can be used.
Upvotes: 4