code: public static boolean avoidDirectResponseOutput( ServletRequest request )
      {
          Boolean avoid = ( Boolean ) request.getAttribute( AVOID_DIRECT_RESPONSE_OUTPUT_ATTR );
          return avoid != null && avoid.booleanValue();
      }
docs: Tell whether a special request attribute was set, indicating that we should avoid writing to the response (or
  setting response error codes).