struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Picasso <>
Subject Struts + Filter Chain = broken?
Date Sat, 27 Dec 2003 22:43:38 GMT
I have a problem using filter chain with Struts

I have wrote a simple filter to use in a servlet
filter chain for postprocessing JSP output.

It works like this:

1. Receive request, wrap response with its own
response wrapper, and then pass it to filter chain.

2. The filter own response wrapper stores content in
its own buffer when any call is made to

3. When request returns from filter chain - get
content from buffer, apply an xslt transformation &
then flush the transformed content to the original

This all works fine when I request directly a JSP

However if the JSP page is request by a struts
forward, when the request returns from the filter
chain - the original
response.getOutputStream().write() never prints
anything to the browser.

Any idea?


I have done many tests and logged my classes and have
notices that when doing a chain.doFilter(request,
wrappedResponse) the
wrappedResponse.writer.write(char[], off, len) once
with the parameters off = 0 and len = *4* (always 4,
even if char[] contains all the text that needs to be postprocessed).

Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message