org.hdiv.dispatcher
Class HDIVServletActionRedirectResult
java.lang.Object
org.apache.struts2.dispatcher.StrutsResultSupport
org.apache.struts2.dispatcher.ServletRedirectResult
org.hdiv.dispatcher.HDIVServletRedirectResult
org.hdiv.dispatcher.HDIVServletActionRedirectResult
- All Implemented Interfaces:
- com.opensymphony.xwork2.Result, java.io.Serializable, org.apache.struts2.StrutsStatics
public class HDIVServletActionRedirectResult
- extends HDIVServletRedirectResult
This result uses the ActionMapper provided by the ActionMapperFactory to redirect the browser to a
URL that invokes the specified action and (optional) namespace. This is better than the ServletRedirectResult
because it does not require you to encode the URL patterns processed by the ActionMapper in to your struts.xml
configuration files. This means you can change your URL patterns at any point and your application will still work.
It is strongly recommended that if you are redirecting to another action, you use this result rather than the
standard redirect result.
- Since:
- HDIV 2.0
- Author:
- Gorka Vicente
- See Also:
ActionMapper,
Serialized Form
| Fields inherited from class org.apache.struts2.dispatcher.ServletRedirectResult |
actionMapper, prependServletContext |
| Fields inherited from interface org.apache.struts2.StrutsStatics |
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT |
| Methods inherited from class org.apache.struts2.dispatcher.ServletRedirectResult |
setActionMapper, setPrependServletContext |
| Methods inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
conditionalParse, getLastFinalLocation, setEncode, setLocation, setParse |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PARAM
public static final java.lang.String DEFAULT_PARAM
- The default parameter
- See Also:
- Constant Field Values
actionName
protected java.lang.String actionName
namespace
protected java.lang.String namespace
method
protected java.lang.String method
prohibitedResultParam
protected java.util.List<java.lang.String> prohibitedResultParam
HDIVServletActionRedirectResult
public HDIVServletActionRedirectResult()
HDIVServletActionRedirectResult
public HDIVServletActionRedirectResult(java.lang.String actionName)
HDIVServletActionRedirectResult
public HDIVServletActionRedirectResult(java.lang.String actionName,
java.lang.String method)
HDIVServletActionRedirectResult
public HDIVServletActionRedirectResult(java.lang.String namespace,
java.lang.String actionName,
java.lang.String method)
execute
public void execute(com.opensymphony.xwork2.ActionInvocation invocation)
throws java.lang.Exception
- Specified by:
execute in interface com.opensymphony.xwork2.Result- Overrides:
execute in class org.apache.struts2.dispatcher.StrutsResultSupport
- Throws:
java.lang.Exception- See Also:
Result.execute(com.opensymphony.xwork2.ActionInvocation)
setActionName
public void setActionName(java.lang.String actionName)
- Sets the action name
- Parameters:
actionName - The name
setNamespace
public void setNamespace(java.lang.String namespace)
- Sets the namespace
- Parameters:
namespace - The namespace
setMethod
public void setMethod(java.lang.String method)
- Sets the method
- Parameters:
method - The method
addParameter
public HDIVServletActionRedirectResult addParameter(java.lang.String key,
java.lang.Object value)
- Adds a request parameter to be added to the redirect url
- Parameters:
key - The parameter namevalue - The parameter value
Copyright © 2008 hdiv.org. All Rights Reserved.