com.opensymphony.webwork.dispatcher
Class ServletRedirectResult
java.lang.Object
com.opensymphony.webwork.dispatcher.WebWorkResultSupport
com.opensymphony.webwork.dispatcher.ServletRedirectResult
- All Implemented Interfaces:
- com.opensymphony.xwork.Result, Serializable, WebWorkStatics
- public class ServletRedirectResult
- extends WebWorkResultSupport
Calls the sendRedirect
method to the location specified.
This result follows the same rules from WebWorkResultSupport
.
- Author:
- Patrick Lightbody
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prependServletContext
protected boolean prependServletContext
ServletRedirectResult
public ServletRedirectResult()
setPrependServletContext
public void setPrependServletContext(boolean prependServletContext)
- 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.
doExecute
protected void doExecute(String finalLocation,
com.opensymphony.xwork.ActionInvocation invocation)
throws Exception
- Redirects to the location specified by calling
HttpServletResponse.sendRedirect(String)
.
- Specified by:
doExecute
in class WebWorkResultSupport
- Parameters:
finalLocation
- the location to redirect to.invocation
- an encapsulation of the action execution state.
- Throws:
Exception
- if an error occurs when redirecting.