-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
Linux 2.6.18-92.el5xen #1 SMP Tue Apr 29 13:31:30 EDT 2008 x86_64
JBOSS Version: jboss-eap-4.3.0.GA CP06
When cookie is set and then get the value get surronded by double quotes.
E.g.
Cookie appCookie = new Cookie("applpath", "/MyAppRoot");
resp.addCookie(appCookie);
Accessing at client side (JS)
function getColorCookie(sName) {
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
return null;
}
Expected Result: applpath = /MyAppRoot
Actual Result: applpath = "/MyAppRoot"
My inference:
Using servlet API when cookie is stored and retrieved, the double quotes may be handled.
When cookie is set using servlet API and read at client side (JS/Applet etc) the quotes introduced are NOT ignored.