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
(Class c, String view) ForwardToView
(Object it, String view) ForwardToView
(javax.servlet.RequestDispatcher dispatcher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateResponse
(StaplerRequest req, StaplerResponse 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
-
Constructor Details
-
ForwardToView
public ForwardToView(javax.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(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException - Specified by:
generateResponse
in interfaceHttpResponse
node
- The object whose "doXyz" method created this object.- Throws:
IOException
javax.servlet.ServletException
-