CacheHttpServletResponseWrapper cacheResponse =
new CacheHttpServletResponseWrapper(response);
chain.doFilter(request, cacheResponse);
cacheResponse.flushBuffer();
// only cache if we didn't get an exception
if (request.getAttribute("DisplayException") == null) {
ResponseContent rc = cacheResponse.getContent();