public final class HttpRedirect extends RuntimeException implements HttpResponse
HttpResponse that dose HTTP 302 redirect.
Extends from RuntimeException so that you can throw it.| Modifier and Type | Field and Description |
|---|---|
static HttpResponse |
CONTEXT_ROOT
Redirect to the context root
|
static HttpRedirect |
DOT
Redirect to "."
|
| Constructor and Description |
|---|
HttpRedirect(int statusCode,
String url) |
HttpRedirect(String url) |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponse |
fromContextPath(String relative)
Deprecated.
|
void |
generateResponse(StaplerRequest req,
StaplerResponse rsp,
Object node) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static HttpRedirect DOT
public static HttpResponse CONTEXT_ROOT
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException
generateResponse in interface HttpResponsenode - The object whose "doXyz" method created this object.IOExceptionjavax.servlet.ServletExceptionpublic static HttpResponse fromContextPath(String relative)
HttpResponses.redirectViaContextPath(String).relative - The path relative to the context path. The context path + this value
is sent to the user.Copyright © 2014. All rights reserved.