I'm trying to migrate an application from JBoss 7,.2.0.Final to WildFly 8.2.0.Final, and I find that some cookies are not written to the servlet response. I've tracked it down to io.undertow.servlet.spec.HttpServletResponseImpl.addCookie().
Apparently the insideCookie flag has been set to true at the point we're calling HttpServletResponse.addCookie(), so WildFly/Undertow just quietly throws it away and leaves me scratching my head trying to figure out what went wrong.
When I search back up the call stack I see that our servlet is including a JSP page in its response like this
So, it makes sense that insideInclude is true, since the code that's trying to set the cookie is being called from inside RequestDispatcher.include(), but I don't understand why WildFly/Undertow just arbitrarily throws it away.
- See more at: https://developer.jboss.org/message/932789?et=watches.email.thread#932789