Skip to content

Instantly share code, notes, and snippets.

@lfryc
Created September 29, 2011 18:24
Show Gist options
  • Save lfryc/1251501 to your computer and use it in GitHub Desktop.
Save lfryc/1251501 to your computer and use it in GitHub Desktop.
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
PrintWriter out = response.getWriter();
CharResponseWrapper wrapper = new CharResponseWrapper((HttpServletResponse) response);
chain.doFilter(request, wrapper);
out.write(wrapper.getData());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment