The action flushes the response buffer before including the target resource. Once headers are sent (which happens during the flush), you cannot set cookies because cookies require HTTP headers. Any attempt to add cookies via response.addCookie() after a jsp:include will fail or be ignored.