Package org.springframework.web

Examples of org.springframework.web.HttpRequestMethodNotSupportedException


        }
        return targetHandlerMethods.get(bestMappingMatch);
      }
      else {
        if (!allowedMethods.isEmpty()) {
          throw new HttpRequestMethodNotSupportedException(request.getMethod(),
              StringUtils.toStringArray(allowedMethods));
        }
        else {
          throw new NoSuchRequestHandlingMethodException(lookupPath, request.getMethod(),
              request.getParameterMap());
View Full Code Here


    if (!ServletAnnotationMappingUtils.checkRequestMethod(mappedMethods, request)) {
      String[] supportedMethods = new String[mappedMethods.length];
      for (int i = 0; i < mappedMethods.length; i++) {
        supportedMethods[i] = mappedMethods[i].name();
      }
      throw new HttpRequestMethodNotSupportedException(request.getMethod(), supportedMethods);
    }

    String[] mappedParams = mapping.params();
    if (!ServletAnnotationMappingUtils.checkParameters(mappedParams, request)) {
      throw new UnsatisfiedServletRequestParameterException(mappedParams, request.getParameterMap());
View Full Code Here

      throws ServletException {

    // Check whether we should support the request method.
    String method = request.getMethod();
    if (this.supportedMethods != null && !this.supportedMethods.contains(method)) {
      throw new HttpRequestMethodNotSupportedException(
          method, StringUtils.toStringArray(this.supportedMethods));
    }

    // Check whether a session is required.
    if (this.requireSession) {
View Full Code Here

   */
  public void handleRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    if (!"POST".equals(request.getMethod())) {
      throw new HttpRequestMethodNotSupportedException(request.getMethod(),
          new String[] {"POST"}, "BurlapServiceExporter only supports POST requests");
    }

    try {
      invoke(request.getInputStream(), response.getOutputStream());
View Full Code Here

   */
  public void handleRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    if (!"POST".equals(request.getMethod())) {
      throw new HttpRequestMethodNotSupportedException(request.getMethod(),
          new String[] {"POST"}, "HessianServiceExporter only supports POST requests");
    }

    response.setContentType(CONTENT_TYPE_HESSIAN);
    try {
View Full Code Here

    if (!ServletAnnotationMappingUtils.checkRequestMethod(mappedMethods, request)) {
      String[] supportedMethods = new String[mappedMethods.length];
      for (int i = 0; i < mappedMethods.length; i++) {
        supportedMethods[i] = mappedMethods[i].name();
      }
      throw new HttpRequestMethodNotSupportedException(request.getMethod(), supportedMethods);
    }

    String[] mappedParams = mapping.params();
    if (!ServletAnnotationMappingUtils.checkParameters(mappedParams, request)) {
      throw new ServletException("Parameter conditions {" +
View Full Code Here

        }
        return targetHandlerMethods.get(bestMappingMatch);
      }
      else {
        if (!allowedMethods.isEmpty()) {
          throw new HttpRequestMethodNotSupportedException(request.getMethod(),
              StringUtils.toStringArray(allowedMethods));
        }
        throw new NoSuchRequestHandlingMethodException(lookupPath, request.getMethod(),
            request.getParameterMap());
      }
View Full Code Here

    if (!ServletAnnotationMappingUtils.checkRequestMethod(mappedMethods, request)) {
      String[] supportedMethods = new String[mappedMethods.length];
      for (int i = 0; i < mappedMethods.length; i++) {
        supportedMethods[i] = mappedMethods[i].name();
      }
      throw new HttpRequestMethodNotSupportedException(request.getMethod(), supportedMethods);
    }

    String[] mappedParams = mapping.params();
    if (!ServletAnnotationMappingUtils.checkParameters(mappedParams, request)) {
      throw new UnsatisfiedServletRequestParameterException(mappedParams, request.getParameterMap());
View Full Code Here

TOP

Related Classes of org.springframework.web.HttpRequestMethodNotSupportedException

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.