|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.action.OnwardResolution<ForwardResolution>
net.sourceforge.stripes.action.ForwardResolution
public class ForwardResolution
Resolution that uses the Servlet API to forward the user to another path within the same web application using a server side forward.
There is one case when this resolution will issue an include instead of a forward. The Servlet specification is ambiguous about what should happen when a forward is issued inside of an include. The behaviour varies widely by container, from outputting only the content of the forward, to only the content prior to the include! To make this behaviour more consistent the ForwardResolution will automatically determine if it is executing inside of an include, and if that is the case it will include the appropriate URL instead of forwarding to it. This behaviour can be turned off be calling autoInclude(false).
RedirectResolution
Constructor Summary | |
---|---|
ForwardResolution(Class<? extends ActionBean> beanType)
Constructs a ForwardResolution that will forward to the URL appropriate for the ActionBean supplied. |
|
ForwardResolution(Class<? extends ActionBean> beanType,
String event)
Constructs a ForwardResolution that will forward to the URL appropriate for the ActionBean supplied. |
|
ForwardResolution(String path)
Simple constructor that takes in the path to forward the user to. |
Method Summary | |
---|---|
void |
autoInclude(boolean auto)
If true then the ForwardResolution will automatically detect when it is executing as part of a server-side Include and include the supplied URL instead of forwarding to it. |
void |
execute(HttpServletRequest request,
HttpServletResponse response)
Attempts to forward the user to the specified path. |
Methods inherited from class net.sourceforge.stripes.action.OnwardResolution |
---|
addParameter, addParameters, getAnchor, getParameters, getPath, getUrl, getUrl, setAnchor, setPath, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ForwardResolution(String path)
path
- the path within the web application that the user should be forwarded topublic ForwardResolution(Class<? extends ActionBean> beanType)
beanType
- the Class object representing the ActionBean to redirect topublic ForwardResolution(Class<? extends ActionBean> beanType, String event)
beanType
- the Class object representing the ActionBean to redirect toevent
- the event that should be triggered on the redirectMethod Detail |
---|
public void autoInclude(boolean auto)
auto
- whether or not to automatically detect and use includespublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
execute
in interface Resolution
request
- the current HttpServletRequestresponse
- the current HttpServletResponse
ServletException
- thrown when the Servlet container encounters an error
IOException
- thrown when the Servlet container encounters an error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |