I'm trying to unset a cookie from a servlet but I'm having
problems doing it in IE5.  This works fine in Netscape 4.6.

Here is the code I use to unset the cookie:

    Cookie c=new Cookie("TEST-LAST", "");
    c.setDomain(".mydomain.com");
    c.setMaxAge(0);
    c.setPath("/");

The warning I get from the Cookie class is:

"WARNING: received an illegal cookie name: TEST-LAST; TEST-NUMITEMS"

(There are two other valid cookies, one of which is named "TEST-NUMITEMS".)

When I view the cookie on the hard drive, it shows that the "TEST-LAST"
cookie has been set with a value of "", but it hasn't been deleted.
When I clear the Temporary Internet Files, it removes the TEST-LAST
cookie and things work fine.

Does anyone have any ideas why this is happening on IE?  Do I have
to do something special to expire the cookie?

Thanks,

-Mike

--
Mike Bridge <[EMAIL PROTECTED]>
System Administrator
Global Sourcing Network

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to