Package org.kohsuke.stapler
Class HttpRedirect
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.kohsuke.stapler.HttpRedirect
- All Implemented Interfaces:
Serializable
,HttpResponse
HttpResponse
that dose HTTP 302 redirect.
Extends from RuntimeException
so that you can throw it.- Author:
- Kohsuke Kawaguchi
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic HttpResponse
Redirect to the context rootstatic final HttpRedirect
Redirect to "." -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpResponse
fromContextPath
(String relative) Deprecated.void
generateResponse
(StaplerRequest2 req, StaplerResponse2 rsp, Object node) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.kohsuke.stapler.HttpResponse
generateResponse
-
Field Details
-
DOT
Redirect to "." -
CONTEXT_ROOT
Redirect to the context root
-
-
Constructor Details
-
HttpRedirect
-
HttpRedirect
-
-
Method Details
-
generateResponse
public void generateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object node) throws IOException, jakarta.servlet.ServletException - Specified by:
generateResponse
in interfaceHttpResponse
node
- The object whose "doXyz" method created this object.- Throws:
IOException
jakarta.servlet.ServletException
-
fromContextPath
Deprecated.- Parameters:
relative
- The path relative to the context path. The context path + this value is sent to the user.
-
HttpResponses.redirectViaContextPath(String)
.