Package org.kohsuke.stapler
Class ForwardToView
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.kohsuke.stapler.ForwardToView
- All Implemented Interfaces:
Serializable
,HttpResponse
HttpResponse
that forwards to a RequestDispatcher
, such as a view.
Extends from RuntimeException
so that you can throw it.- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionForwardToView
(jakarta.servlet.RequestDispatcher dispatcher) ForwardToView
(Class c, String view) ForwardToView
(Object it, String view) -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateResponse
(StaplerRequest2 req, StaplerResponse2 rsp, Object node) optional()
Make this forwarding optional.Forwards to the view with specified attributes exposed as a variable binding.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
-
Constructor Details
-
ForwardToView
public ForwardToView(jakarta.servlet.RequestDispatcher dispatcher) -
ForwardToView
-
ForwardToView
-
-
Method Details
-
with
Forwards to the view with specified attributes exposed as a variable binding. -
with
-
optional
Make this forwarding optional. Render nothing if a view doesn't exist. -
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
-