Can you test the return value from: response.addCookie( id); ?
If not, the only way to check if cookies are supported by the user's
browser:
attempt to read the cookie immediately after writing it !!!
If that fails, then display a warning page with instructions on how to
enable cookies....based on the browser-type.
Cookies are powerful, but very, very touchy !
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Brad Miley
> Sent: Thursday, June 01, 2000 6:00 PM
> To: [EMAIL PROTECTED]
> Subject: cookie
>
>
> I have a sign in form whose action is a jsp page named action.jsp
> In action.jsp I want to create a cookie, that stores the user's name and
> then have the user go to a page that says Welcome "so and so"
> The cookie is not being created though. Does anyone know what the problem
> could be? Thank you
> in action.jsp:
>
> user.setLoggedIn( true );
> Cookie id = new Cookie("name", "test");
> id.setMaxAge( 7 * 24 * 60 * 60 );
> id.setVersion(0);
> id.setSecure( false );
> id.setComment( "This cookie is used to remember your name" );
> response.addCookie( id );
> %><jsp:forward page= "welcomec.jsp"/><%
>
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets