DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3799>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3799 Setting null cookie value throws exception Summary: Setting null cookie value throws exception Product: Tomcat 4 Version: 4.0 Final Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The standard way to delete a cookie is to set the cookie's value to null then re-add the cookie to the response: <% // Cookie test Cookie cookie = new Cookie("foo",null); // add cookie response.addCookie(cookie); %> This results in a NullPointerException because Tomcat tries to URLEncode a null value. The ability to delete a cookie is a critical necessity as it will prevent most webapps that use cookies from working correctly.