I'm having a problem setting cookies. I am using some very simple code to
set my name and email address in a cookie. This works for certain versions
of Explorer and most all versions of Netscape (at least given the test
machines I have available). Unfortunately it doesn't work for a large
number of Internet Explorer (Windows) apps. Most specifically 5.5 on Win98.
I currently understand this to be a problem with the "expiration" setting in
the cookie. If it's not explicitly set, IE assumes it's a session cookie
and doesn't actually write the cookie to disk. I'd like to verify that this
is true and if so, what is the best way to program this cookie such that all
browsers treat this as a permanent cookie, with a valid expiration.
Cookie name = new Cookie("name", "jay");
name.setMaxAge(31536000);
Cookie email = new Cookie("email", "[EMAIL PROTECTED]");
password.setMaxAge(31536000);
response.addCookie(name);
response.addCookie(email);
Thanks,
Jay
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html