Tom;
I have been experiencing the same problem. I set the maxAge and domain of my
cookie and when I retrieve it later on, the instance variables are all defaults.
This includes the domain as null and the max age being set to -1.
I am running under WebSphere 2.03. I create a cookie within a servlet using the
Cookie class and send it back to the client. When I later retrieve it, its state
has been changed from what I set it. Sounds like a Cookie class implementation
issue? Please let me know if you find anything out.
Eric
I create cookies on client using Cookie class. Before doing add, I
setDomain and I setMaxAge.
When I read the cookies in on a later page:
Cookie myCookies[] = request.getCookies();
if (myCookies != null)
{
for (int i=0; i < myCookies.length; i++) {
out.print(myCookies[i].getName() + " :: " + myCookies[i].getValue() +
myCookies[i].getDomain() + " :: " + myCookies[i].getMaxAge());
}
}
The getDomain() always returns null. The getMaxAge() always returns -1.
Is anyone else having the same problem?
tia.
--
Tom
Thomas Preston
Vacation.com, Inc.
Engineering Department
617.210.4855 x 124
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html