Class ResponseOutputStreamFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class ResponseOutputStreamFilter
    extends com.atlassian.core.filters.AbstractHttpFilter
    Wraps the HttpServletResponse's ServletOutputStream so that it is closed properly.

    See https://wiki.apache.org/tomcat/FAQ/KnownIssues#ImageIOIssues for why this is required for Tomcat - it's added for all app servers because they might decide to pool Response instances too.

    • Constructor Detail

      • ResponseOutputStreamFilter

        public ResponseOutputStreamFilter()
    • Method Detail

      • doFilter

        protected void doFilter​(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                javax.servlet.FilterChain filterChain)
                         throws IOException,
                                javax.servlet.ServletException
        Specified by:
        doFilter in class com.atlassian.core.filters.AbstractHttpFilter
        Throws:
        IOException
        javax.servlet.ServletException