Package org.springframework.web.bind

Examples of org.springframework.web.bind.ServletRequestBindingException


      paramValues = new ArrayList<String>();
      for (MultiValueMap<String, String> params : pathParameters.values()) {
        if (params.containsKey(name)) {
          if (found) {
            String paramType = parameter.getParameterType().getName();
            throw new ServletRequestBindingException(
                "Found more than one match for URI path parameter '" + name +
                "' for parameter type [" + paramType + "]. Use pathVar attribute to disambiguate.");
          }
          paramValues.addAll(params.get(name));
          found = true;
View Full Code Here


  }

  @Override
  protected void handleMissingValue(String name, MethodParameter param) throws ServletRequestBindingException {
    String paramType = param.getParameterType().getName();
    throw new ServletRequestBindingException(
        "Missing matrix variable '" + name + "' for method parameter type [" + paramType + "]");
  }
View Full Code Here

  }

  @Override
  protected void handleMissingValue(String cookieName, MethodParameter param) throws ServletRequestBindingException {
    String paramType = param.getParameterType().getName();
    throw new ServletRequestBindingException(
        "Missing cookie named '" + cookieName + "' for method parameter type [" + paramType + "]");
  }
View Full Code Here

  }

  @Override
  protected void handleMissingValue(String headerName, MethodParameter param) throws ServletRequestBindingException {
    String paramType = param.getParameterType().getName();
    throw new ServletRequestBindingException(
        "Missing header '" + headerName + "' for method parameter type [" + paramType + "]");
  }
View Full Code Here

  }

  @Override
  protected void handleMissingValue(String name, MethodParameter param) throws ServletRequestBindingException {
    String paramType = param.getParameterType().getName();
    throw new ServletRequestBindingException(
        "Missing URI template variable '" + name + "' for method parameter type [" + paramType + "]");
  }
View Full Code Here

      throw new UnsatisfiedServletRequestParameterException(mappedParams, request.getParameterMap());
    }

    String[] mappedHeaders = mapping.headers();
    if (!ServletAnnotationMappingUtils.checkHeaders(mappedHeaders, request)) {
      throw new ServletRequestBindingException("Header conditions \"" +
          StringUtils.arrayToDelimitedString(mappedHeaders, ", ") +
          "\" not met for actual request");
    }
  }
View Full Code Here

  }

  @Override
  protected void handleMissingValue(String name, MethodParameter param) throws ServletRequestBindingException {
    String paramType = param.getParameterType().getName();
    throw new ServletRequestBindingException(
        "Missing URI template variable '" + name + "' for method parameter type [" + paramType + "]");
  }
View Full Code Here

      throw new UnsatisfiedServletRequestParameterException(mappedParams, request.getParameterMap());
    }

    String[] mappedHeaders = mapping.headers();
    if (!ServletAnnotationMappingUtils.checkHeaders(mappedHeaders, request)) {
      throw new ServletRequestBindingException("Header conditions \"" +
          StringUtils.arrayToDelimitedString(mappedHeaders, ", ") +
          "\" not met for actual request");
    }
  }
View Full Code Here

      }
      if (request.getParameter("access") != null) {
        throw new IllegalAccessException("illegal access");
      }
      if (request.getParameter("servlet") != null) {
        throw new ServletRequestBindingException("servlet");
      }
      if (request.getParameter("exception") != null) {
        throw new RuntimeException("servlet");
      }
    }
View Full Code Here

    // must go straight through
    testExceptionNoHandler(new ServletException());

    // subclass of servlet exception
    testExceptionNoHandler(new ServletRequestBindingException("foo"));
    testExceptionNoHandler(new RuntimeException());
    testExceptionNoHandler(new Error());
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.ServletRequestBindingException

Copyright © 2018 www.massapicom. 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.