You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sameer <sk...@srijansoft.com> on 2000/12/21 12:38:57 UTC
Cookie Deletion
Hi all,
I'm trying to delete a cookie using this :
........
<%
String name1 = request.getParameter("cookieno");
Cookie delCookie = new Cookie(name1,null);
delCookie.setMaxAge(0);
response.addCookie(delCookie);
%>
...........
where name1 is the name of the cookie, this piece of code runs fine on Java
Web Server, but when I use this on a Tomcat Server, I get a null pointer
exception when I try to retrieve the cookies after I have executed the above
code,
any help?...or suggestions on where im going wrong
thanks in anticipation,
Sameer