code: public void doFilter(ServletRequest servRequest, ServletResponse servResponse, FilterChain chain) throws IOException, ServletException {
          if (!isHttpServlet(servRequest, servResponse)) {
              chain.doFilter(servRequest, servResponse);
              return;
          }
          final HttpServletRequest request = (HttpServletRequest) servRequest;
          final HttpServletResponse response = (HttpServletResponse) servResponse;
          if (isAlreadyBegun()) { // e.g. forwarding to JSP or .html
              chain.doFilter(request, response);
          } else if (!isTargetPath(request)) { // e.g. .css, .js
              staticResourceFilter(request, response, chain);
          } else { // target top level process
              actuallyFilter(chain, request, response);
          }
      }
docs: ======