I solved this problem by overriding the ServletResponse.flushBuffer method. Under WAS8, flushBuffer is called prematurely. Passing the HttpServletResponseWrapper with the no-operation flushBuffer to the ShallowEtagHeaderFilter did the trick.
public class HttpCacheFilter extends ShallowEtagHeaderFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { HttpCacheResponseWrapper responseWrapper = new HttpCacheResponseWrapper(response); super.doFilterInternal(request, responseWrapper, filterChain); } private static class HttpCacheResponseWrapper extends HttpServletResponseWrapper { public HttpCacheResponseWrapper(HttpServletResponse response) { super(response); } @Override public void flushBuffer() throws IOException {
source share