org.kohsuke.stapler
Class ForwardToView
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.kohsuke.stapler.ForwardToView
- All Implemented Interfaces:
- java.io.Serializable, HttpResponse
public class ForwardToView
- extends java.lang.RuntimeException
- implements 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:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ForwardToView
public ForwardToView(javax.servlet.RequestDispatcher dispatcher)
ForwardToView
public ForwardToView(java.lang.Object it,
java.lang.String view)
ForwardToView
public ForwardToView(java.lang.Class c,
java.lang.String view)
with
public ForwardToView with(java.lang.String varName,
java.lang.Object value)
- Forwards to the view with specified attributes exposed as a variable binding.
with
public ForwardToView with(java.util.Map<java.lang.String,?> attributes)
optional
public ForwardToView optional()
- Make this forwarding optional. Render nothing if a view doesn't exist.
generateResponse
public void generateResponse(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node)
throws java.io.IOException,
javax.servlet.ServletException
- Specified by:
generateResponse
in interface HttpResponse
node
- The object whose "doXyz" method created this object.
- Throws:
java.io.IOException
javax.servlet.ServletException
Copyright © 2012. All Rights Reserved.