I am adding cookies using response.addCookie
and then redirect using response.sendRedirect
to an URL in different domain. Cookie path is already set to "/".
HttpServletResponse response = (HttpServletResponse) Facescontext.getCurrentInstance().getExternalcontext().getResponse();
response.addCookie(cookie);
response.sendRedirect("http://different.domain.com/xyz.xhtml");
I had observed in debug mode and inspecting the response objects at each level cookies are lost before calling the "xhtml" page itself.
I'm using Tomcat 7.0.26. JDK 1.7 and JSF 2.0.