You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by pb...@apache.org on 2007/04/23 05:29:54 UTC

svn commit: r531322 - /struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionMapping.java

Author: pbenedict
Date: Sun Apr 22 20:29:53 2007
New Revision: 531322

URL: http://svn.apache.org/viewvc?view=rev&rev=531322
Log:
STR-3025: Fallback to "input" forward when controller is configured as such

Modified:
    struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionMapping.java

Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionMapping.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionMapping.java?view=diff&rev=531322&r1=531321&r2=531322
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionMapping.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionMapping.java Sun Apr 22 20:29:53 2007
@@ -100,17 +100,24 @@
     }
 
     /**
-     * <p>Create (if necessary) and return an {@link ActionForward} that
-     * corresponds to the <code>input</code> property of this Action.</p>
-     *
+     * <p>
+     * Create (if necessary) and return an {@link ActionForward} that
+     * corresponds to the <code>input</code> property of this Action.
+     * If the input parameter is specified, use that, otherwise try
+     * to find one in the mapping or the module under the standard
+     * conventional "input" name.
+     * 
      * @return The input forward for this action mapping.
      * @since Struts 1.1
      */
     public ActionForward getInputForward() {
+        String input = getInput();
         if (getModuleConfig().getControllerConfig().getInputForward()) {
-            return (findForward(getInput()));
-        } else {
-            return (new ActionForward(getInput()));
+            if (input != null) {
+                return findForward(input);
+            }
+            return findForward(Action.INPUT);
         }
+        return (new ActionForward(input));
     }
 }