I'm not particularly grounded in web development, so this may
not be specific to Tomcat. I'm hoping someone can explain how
this works.

I can get cookies sent back to the browser when performing a
redirect if I set them _after_ I issue the redirect. That is, if
I write:

<%
response.sendRedirect("bar.jsp");
response.addCookie(new Cookie("baz","quux"));
%>

Can someone please explain (or point to a resource) why a cookie
doesn't "stick" unless I set it after I specify the redirect?

Thanks in advance,

Mike


Reply via email to