> 39) How do I delete a cookie with JSP? TOC
> From: Chris Fesler <[EMAIL PROTECTED]>
> A little more experimentation, and I came up with a method to
delete
> cookies. Say that I have a cookie called "foo," that I set a while ago & I
> want it to go away. I simply:
> <%
> Cookie killCookie = new Cookie("foo", null);
> killCookie.setPath("/");
> killCookie.setMaxAge(0);
> response.addCookie(killCookie);
> %>
> Note that this is -not- how the JSDK documentation indicates
cookies
> are to be deleted, but what the heck -- it seems to work.
Thanks. I looked at the regular FAQ, but failed in checking out the JSP
FAQ. But, I can report that this does in fact now work for me. The only
"special" looking code is the setPath(), which obviously is a key factor.
David
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".