I am experiencing similar problems setting cookies. However, I have found
that it is browser dependent, ie., works fine with Netscape (4.7) but
doesn't set with IE 5.5 .. What browser are you using?
> -----Original Message-----
> From: David M. Rosner [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 12, 2001 1:41 PM
> To: [EMAIL PROTECTED]
> Subject: Weird Cookie Behavior
>
>
> Hi All,
>
> I have a jsp that sets a cookie named 'riCookie'. For some
> reason this
> cookie will not be sent to the browser unless I set an
> additional cookie
> after that. Here is the code:
>
> This doesn't work:
>
> <%
> response.addCookie( new Cookie("riCookie", "DATA" ) ) ;
> response.sendRedirect( "/someOtherPage.jsp" );
> %>
>
> But this does work:
> <%
> response.addCookie( new Cookie("riCookie", "DATA" ) ) ;
> response.addCookie( new Cookie("Something", "More DATA" ) ) ;
> response.sendRedirect( "/someOtherPage.jsp" );
> %>
>
> Any idea why? I tried other names with the word 'Cookie' in
> them and they
> seem to work as well.
>
> Thanks for any help,
>
> -dave
>
>