You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by tm...@apache.org on 2006/05/14 11:26:03 UTC
svn commit: r406288 -
/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java
Author: tmjee
Date: Sun May 14 02:26:02 2006
New Revision: 406288
URL: http://svn.apache.org/viewcvs?rev=406288&view=rev
Log:
WW-1269
Modified:
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java
Modified: struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java
URL: http://svn.apache.org/viewcvs/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java?rev=406288&r1=406287&r2=406288&view=diff
==============================================================================
--- struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java (original)
+++ struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ServletActionRedirectResult.java Sun May 14 02:26:02 2006
@@ -17,9 +17,13 @@
*/
package org.apache.struts.action2.dispatcher;
+import java.util.Map;
+
import org.apache.struts.action2.dispatcher.mapper.ActionMapper;
import org.apache.struts.action2.dispatcher.mapper.ActionMapperFactory;
import org.apache.struts.action2.dispatcher.mapper.ActionMapping;
+import org.apache.struts.action2.views.util.UrlHelper;
+
import com.opensymphony.xwork.ActionInvocation;
/**
@@ -85,7 +89,8 @@
protected String actionName;
protected String namespace;
-
+ protected String method;
+
public void execute(ActionInvocation invocation) throws Exception {
actionName = conditionalParse(actionName, invocation);
if (namespace == null) {
@@ -93,9 +98,15 @@
} else {
namespace = conditionalParse(namespace, invocation);
}
+ if (method == null) {
+ method = "";
+ }
+ else {
+ method = conditionalParse(method, invocation);
+ }
ActionMapper mapper = ActionMapperFactory.getMapper();
- location = mapper.getUriFromActionMapping(new ActionMapping(actionName, namespace, "", null));
+ location = mapper.getUriFromActionMapping(new ActionMapping(actionName, namespace, method, null));
super.execute(invocation);
}
@@ -106,5 +117,9 @@
public void setNamespace(String namespace) {
this.namespace = namespace;
+ }
+
+ public void setMethod(String method) {
+ this.method = method;
}
}