| java.lang.Object com.opensymphony.webwork.dispatcher.WebWorkResultSupport com.opensymphony.webwork.dispatcher.ServletRedirectResult
All known Subclasses: com.opensymphony.webwork.dispatcher.ServletActionRedirectResult, com.opensymphony.webwork.dispatcher.FlashResult,
ServletRedirectResult | public class ServletRedirectResult extends WebWorkResultSupport (Code) | |
Calls the
HttpServletResponse.sendRedirect(String) sendRedirect method to the location specified. The response is told to redirect the
browser to the specified location (a new request from the client). The
consequence of doing this means that the action (action instance, action
errors, field errors, etc) that was just executed is lost and no longer
available. This is because actions are built on a single-thread model. The
only way to pass data is through the session or with web parameters
(url?name=value) which can be OGNL expressions.
This result type takes the following parameters:
- location (default) - the location to go to after execution.
- parse - true by default. If set to false, the location param will
not be parsed for Ognl expressions.
This result follows the same rules from
WebWorkResultSupport .
Example:
<result name="success" type="redirect">
<param name="location">foo.jsp</param>
<param name="parse">false</param>
</result>
author: Patrick Lightbody |
prependServletContext | protected boolean prependServletContext(Code) | | |
setPrependServletContext | public void setPrependServletContext(boolean prependServletContext)(Code) | | Sets whether or not to prepend the servlet context path to the redirected URL.
Parameters: prependServletContext - true to prepend the location with the servlet context path,false otherwise. |
|
|