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: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to