tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srevi...@g88.net
Subject Re: RES: Cookie problem max age problem - Best practice to solve it
Date Fri, 01 Aug 2003 13:10:52 GMT
srevilak> Setting the max age of a cookie to zero is the proper way to
srevilak> delete a cookie.  When doing the deletion, are you sure that
srevilak> the name, domain, and path values are identical to the ones
srevilak> used when the cookie was initially set?

jose> Thanks for your attention! The question stays alive because this
jose> plugin runs fine on OC4J(Oracle) environment, but its always a
jose> failure on Tomcat env.  Any other help would be appreciated.
jose> Euclides.

It's perfectly okay for a cookie to be set by one application, then
removed by another.

What are the values used for domain, path, and name when the cookie is
set?  Most useragents provide a way to have the user prompted for each
cookie.  That would be a helpful thing to do in this case.

What are the values used for domain, path, and name when the cookie is
deleted?

While domain and path are set when sending a cookie, the client only
sends back the name and value pair (domain and path are used by the
client in determining what cookies to send).  As a result, something
like this won't work

  deleteCookie.setDomain(cookieFromClient.getDomain());

hth.

-- 
Steve

Mime
View raw message