Examples of AbortWithHttpStatusException


Examples of org.apache.wicket.protocol.http.servlet.AbortWithHttpStatusException

    button = new Button("abortWithHttpStatusExceptionBtn") {
      private static final long serialVersionUID = 1L;
     
      @Override
      public void onSubmit() {
        throw new AbortWithHttpStatusException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, //
            false);
      }
    };
    form.add(button);
  }
View Full Code Here

Examples of org.apache.wicket.protocol.http.servlet.AbortWithHttpStatusException

  }

  public static void performRedirect(final String targetURL, final int statusCode) {
    final BufferedWebResponse response = (BufferedWebResponse) RequestCycle.get().getResponse();
    response.getHttpServletResponse().setHeader("Location", targetURL);
    throw new AbortWithHttpStatusException(statusCode, true);
  }
View Full Code Here

Examples of org.apache.wicket.protocol.http.servlet.AbortWithHttpStatusException

  }

  public static void performRedirect(final String targetURL, final int statusCode) {
    final BufferedWebResponse response = (BufferedWebResponse) RequestCycle.get().getResponse();
    response.getHttpServletResponse().setHeader("Location", targetURL);
    throw new AbortWithHttpStatusException(HttpServletResponse.SC_MOVED_PERMANENTLY, true);
  }
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.