When using Struts, all requests are sent to the Controller Servlet which then executes an Action and finally
forwards to a view (I have taken this simple case as an example).
A filter is configured to process the request/response sent to the controller, using <url-pattern> or <servlet-name>. When the controller servlet forwards the request/response to the
jsp (view), then the filter (if it is a post-processing filter) tries to write content to the reponse which is currently being used by the jsp (view) to which the forward was made. This causes an Exception to be thrown.
The Servlet 2.3 specification does not state how filters should behave when FORWARDS or INCLUDES are performed using a RequestDispatcher. The 2.4 version of the specification covers this in
SRV.6.2.5 Filters and the RequestDispatcher.
Hope this answers your question.
Sheldon Fernandes