Examples of sendError()


Examples of javax.servlet.http.HttpServletResponse.sendError()

      res.sendError(res.SC_FORBIDDEN);
      return;
    }

    if (_role != null && ! req.isUserInRole(_role)) {
      res.sendError(res.SC_FORBIDDEN);
      return;
    }

    if (_user != null) {
      java.security.Principal principal = req.getUserPrincipal();
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

    }

    if (_user != null) {
      java.security.Principal principal = req.getUserPrincipal();
      if (principal == null) {
        res.sendError(res.SC_FORBIDDEN);
        return;
      }
      if (! principal.getName().equals(_user)) {
        res.sendError(res.SC_FORBIDDEN);
        return;
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

      if (principal == null) {
        res.sendError(res.SC_FORBIDDEN);
        return;
      }
      if (! principal.getName().equals(_user)) {
        res.sendError(res.SC_FORBIDDEN);
        return;
      }
    }
   
    ServletContext app = getServletContext();
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

               "MKCOL".equals(req.getMethod()) ||
               "DELETE".equals(req.getMethod()) ||
               "COPY".equals(req.getMethod()) ||
               "MOVE".equals(req.getMethod()) ||
               "PROPPATCH".equals(req.getMethod())) {
        res.sendError(res.SC_FORBIDDEN);
      }
      else {
        res.sendError(res.SC_NOT_IMPLEMENTED, "Method not implemented");
      }
    } finally {
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

               "MOVE".equals(req.getMethod()) ||
               "PROPPATCH".equals(req.getMethod())) {
        res.sendError(res.SC_FORBIDDEN);
      }
      else {
        res.sendError(res.SC_NOT_IMPLEMENTED, "Method not implemented");
      }
    } finally {
      out.close();
    }
  }
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

    if (stream == null) {
      if (log.isLoggable(Level.FINE))
        log.fine(this + " cannot open a stream from " + _loadBalancer);

      res.sendError(503);
      return;
    }

    try {
      // fcgiSocket.setExpire(Alarm.getCurrentTime() + _keepaliveTimeout);
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

    throws ServletException, IOException
  {
    HttpServletResponse res = (HttpServletResponse) response;

    if (_message != null)
      res.sendError(_statusCode, _message);
    else
      res.sendError(_statusCode);
  }
}
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

    HttpServletResponse res = (HttpServletResponse) response;

    if (_message != null)
      res.sendError(_statusCode, _message);
    else
      res.sendError(_statusCode);
  }
}
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

    if (req.getParameter("save") != null) {

      if (aidMap != null)
        serveAidMap(aidMap, res);
      else
        response.sendError(HttpServletResponse.SC_NO_CONTENT);

      return;
    }

    final FacesContext oldContext = FacesContext.getCurrentInstance();
View Full Code Here

Examples of javax.servlet.http.HttpServletResponse.sendError()

     
      if (stream == null) {
        log.warning(L.l("{0}: no backend servers available to process {1}",
                        this, req.getRequestURI()));

        res.sendError(503); // send a busy
      }
      else if (handleRequest(req, res, uri, stream)) {
        stream.free(startRequestTime);
        stream = null;
        return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.