Package org.apache.catalina.connector

Examples of org.apache.catalina.connector.Response.sendError()


            authenticateCC.append(config.getRealmName());
         }
         authenticateCC.append('\"');       
         authenticate.toChars();

         response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
      }
      catch (IOException e)
      {
         log.error("IOException ", e);
      }
View Full Code Here


          } else {
              log.trace("Restore of original request failed");
           
            try
            {
               response.sendError(HttpServletResponse.SC_BAD_REQUEST);
            }
            catch (IOException e)
            {
               log.error(e.getLocalizedMessage(),e);
            }
View Full Code Here

              saveRequest(request, session);
          } catch (IOException ioe) {
              log.trace("Request body too big to save during authentication");
              try
            {
               response.sendError(HttpServletResponse.SC_FORBIDDEN,
                         sm.getString("authenticator.requestBodyTooBig"));
            }
            catch (IOException e)
            {
               log.error("Exception in Form authentication:",e);
View Full Code Here

      if (session == null) {
          log.trace
                  ("User took so long to log on the session expired");
          try
         {
            response.sendError(HttpServletResponse.SC_REQUEST_TIMEOUT,
                                sm.getString("authenticator.sessionExpired"));
         }
         catch (IOException e)
         {
            log.error(e.getLocalizedMessage(),e);
View Full Code Here

      requestURI = savedRequestURL(session);
      log.trace("Redirecting to original '" + requestURI + "'");
      try
      {
         if (requestURI == null)
            response.sendError(HttpServletResponse.SC_BAD_REQUEST,
                               sm.getString("authenticator.formlogin"));
        else
            response.sendRedirect(response.encodeRedirectURL(requestURI))
      }
      catch(IOException ioe)
View Full Code Here

      }
      if ((certs == null) || (certs.length < 1)) {
         log.debug("  No certificates included with this request");
         try
         {
            response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
                  sm.getString("authenticator.certificates"));
         }
         catch (IOException e)
         {
            log.error(e.getLocalizedMessage(),e);
View Full Code Here

      principal = context.getRealm().authenticate(certs);
      if (principal == null) {
         log.debug("  Realm.authenticate() returned false");
         try
         {
            response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
                  sm.getString("authenticator.unauthorized"));
         }
         catch (IOException e)
         {
            log.error(e.getLocalizedMessage(),e);
View Full Code Here

            certs = (X509Certificate[]) request.getAttribute(CERTIFICATES_ATTR);
        }
        if ((certs == null) || (certs.length < 1)) {
            log.debugf("No certificates included with this request");
            try {
                response.sendError(HttpServletResponse.SC_UNAUTHORIZED, sm.getString("authenticator.certificates"));
            } catch (IOException e) {
                log.errorf("Caught Exception: %s", e.getLocalizedMessage());
            }
            return (AuthStatus.FAILURE);
        }
View Full Code Here

        // Authenticate the specified certificate chain
        principal = context.getRealm().authenticate(certs);
        if (principal == null) {
            log.debugf("Realm.authenticate() returned false");
            try {
                response.sendError(HttpServletResponse.SC_UNAUTHORIZED, sm.getString("authenticator.unauthorized"));
            } catch (IOException e) {
                log.errorf("Caught Exception: %s", e.getLocalizedMessage());
            }
            return (AuthStatus.FAILURE);
        }
View Full Code Here

                return (AuthStatus.SUCCESS);
            } else {
                log.tracef("Restore of original request failed");

                try {
                    response.sendError(HttpServletResponse.SC_BAD_REQUEST);
                } catch (IOException e) {
                    log.errorf("Caught Exception: %s", e.getLocalizedMessage());
                }
                return AuthStatus.FAILURE;
            }
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.