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, toString
public 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 HttpResponse
node
- The object whose "doXyz" method created this object.IOException
javax.servlet.ServletException
public 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 © 2016. All rights reserved.