Hi,
I'm having a problem resetting cookies on Netscape 4.72. I set the preference in netscape to warn me before accepting any cookies, which also tells me the expiration date of the cookie. Through this I could see that the cookie was being reset (the expiry time for the cookie was shown as year 1970). But when I try to access the site again, the cookie was not deleted & my servlet could still find the cookie. The code that 'm using to set & reset the cookie is listed below :
public void setCookie(String cookieName, String cookieValue) {
Cookie cookie=null;
int maxAge=60602436510;
cookie =
new Cookie(cookieName,cookieValue);
cookie.setMaxAge(maxAge);
cookie.setPath("/main");
response.addCookie(cookie);
return;
}
public void resetCookie(String cookieName, String cookieValue) {
Cookie cookie=null;
int maxAge=0;
cookie =
new Cookie(cookieName,cookieValue);
cookie.setMaxAge(maxAge);
cookie.setPath("/main");
response.addCookie(cookie);
return;
}