How are the cookies treated by Tomcat?
take this cookie for example: name=lastname, firstname
for version 0 the comma and the space are not valid but for version 1 they
are
If I have my Cookie version set to 1 the cookie looks like this:
name="lastname, firstname" when read by JavaScript
if read by jsp with this code
Cookie[] c = request.getCookies();
for (int i=0; c != null && i < c.length; i++){
out.write("<br>"+i+": "+c[i].getName()+"="+c[i].getValue());
}
it splits the name cookie in two separate cookies:
1. name="lastname and
2. firstname"=
If I have my Cookie version set to 0 the cookie looks like this:
name=lastname, firstname when read by JavaScript
but the server throws this error java.lang.IllegalArgumentException:
lastname, firstname
Which is the right way of creating and reading cookie values when using
Tomcat?
I was using IE6.0 for these tests.
Thanks,
Ross
"This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution."