tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Beech <>
Subject Tomcat 6.0.20 - Workaround for reading the value of a cookie with special characters
Date Sat, 16 Jan 2010 06:41:59 GMT


I am trying to read the value of a cookie


String cookievalue = cookie.getValue();


where the value itself contains the equal sign, i.e. SESSIONID=1234567890.
We were using Tomcat 6.0.14 which based on the code sample above the value
of cookievalue would be the string SESSIONID=1234567890. The issue that I am
now encountering in Tomcat 6.0.20 is that cookie.getValue() is truncating
the resultant string at the equal sign and only returns SESSIONID.


I realize now after some searching on the internet that our cookie does not
conform to a set standard and that the Tomcat HttpRequest class is operating
as designed in this instance. Unfortunately, our cookie is set by my
organization and as a developer I have no control over how our cookie is
being set.


Are there any workarounds available that will retrieve the entire string


Thank you in advance,


Travis Beech 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message