code: public void sendError(int status, String msg) throws IOException {
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
              logger.entering(CLASS_NAME,"sendError", "status --> " + status + " " + msg + " ["+this+"]");
          }
  
          WebAppDispatcherContext dispatchContext = (WebAppDispatcherContext) getRequest().getWebAppDispatcherContext();
          if (!WCCustomProperties.ALLOW_INCLUDE_SEND_ERROR&&dispatchContext.isInclude()) {
              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                  logger.logp(Level.FINE, CLASS_NAME,"sendError", nls.getString("Illegal.from.included.servlet", "Illegal from included servlet"), "sendError --> " + status + " with message --> " + msg);  //311717
              }
          }
          else {
              dispatchContext.sendError(status, msg);
  
              this.closeResponseOutput();
          }
  
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
              logger.exiting(CLASS_NAME,"sendError");
          }        
      }
docs: Sends an error response to the client using the specified status code and detail message.
  
  @param status the status code.
  @param msg the detail message.
  
  @exception IOException
  If an I/O error has occurred.