code: public static void sendError( String messageKey, Throwable cause, ServletRequest request,
                                    HttpServletResponse response, Object[] messageArgs )
              throws IOException
      {
          // TODO: the following null check will be unnecessary once the deprecated
          // FlowController.sendError(String, HttpServletResponse) is removed.
          boolean avoidDirectResponseOutput = request != null ? avoidDirectResponseOutput( request ) : false;
          sendError( messageKey, messageArgs, request, response, cause, avoidDirectResponseOutput );
      }
docs: Write an error to the response.