org.kohsuke.stapler
public final class HttpRedirect extends java.lang.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(java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
static HttpResponse |
fromContextPath(java.lang.String relative)
Deprecated.
|
void |
generateResponse(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node) |
public static HttpRedirect DOT
public static HttpResponse CONTEXT_ROOT
public void generateResponse(StaplerRequest req, StaplerResponse rsp, java.lang.Object node) throws java.io.IOException, javax.servlet.ServletException
generateResponse
in interface HttpResponse
node
- The object whose "doXyz" method created this object.java.io.IOException
javax.servlet.ServletException
public static HttpResponse fromContextPath(java.lang.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.