Package org.springframework.web

Examples of org.springframework.web.HttpRequestMethodNotSupportedException


      throws ServletException, IOException {

    Assert.notNull(this.skeleton, "BurlapServiceExporter has not been initialized");

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

    BurlapInput in = new BurlapInput(request.getInputStream());
    BurlapOutput out = new BurlapOutput(response.getOutputStream());
View Full Code Here


      throws ServletException, IOException {

    Assert.notNull(this.skeletonInvoker, "HessianServiceExporter has not been initialized");

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

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

      throws ServletException {

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

    // Check whether a session is required.
    if (this.requireSession) {
      if (request.getSession(false) == null) {
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

  /**
   * Processes the incoming Hessian request and creates a Hessian response.
   */
  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");
    }
   
    if (!"null".equals(request.getMethod())) {
      //throw new HttpRequestMethodNotSupportedException(request.getMethod(),new String[] {"POST"}, "You Must Login");
    }
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");
    }

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

  @Override
  public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
      throws AuthenticationException, IOException, ServletException {

    if (allowOnlyPost && !"POST".equalsIgnoreCase(request.getMethod())) {
      throw new HttpRequestMethodNotSupportedException(request.getMethod(), new String[] { "POST" });
    }

    String clientId = request.getParameter("client_id");
    String clientSecret = request.getParameter("client_secret");
View Full Code Here

        if (null == prop.propertyValue) {
          return null;
        }

        if (prop.property.isCollectionLike()) {
          throw new HttpRequestMethodNotSupportedException("DELETE");
        } else if (prop.property.isMap()) {
          throw new HttpRequestMethodNotSupportedException("DELETE");
        } else {
          prop.wrapper.setProperty(prop.property, null);
        }

        publisher.publishEvent(new BeforeLinkDeleteEvent(prop.wrapper.getBean(), prop.propertyValue));
View Full Code Here

          prop.wrapper.setProperty(prop.property, m);

        } else {

          if (HttpMethod.PATCH.equals(requestMethod)) {
            throw new HttpRequestMethodNotSupportedException(HttpMethod.PATCH.name(), new String[] { "PATCH" },
                "Cannot PATCH a reference to this singular property since the property type is not a List or a Map.");
          }

          if (incoming.getLinks().size() != 1) {
            throw new IllegalArgumentException(
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.