You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ni...@apache.org on 2006/11/29 14:39:38 UTC

svn commit: r480570 - /struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/MappingDispatchAction.java

Author: niallp
Date: Wed Nov 29 05:39:37 2006
New Revision: 480570

URL: http://svn.apache.org/viewvc?view=rev&rev=480570
Log:
STR-2903 Override the getParameter() method in MappingDispatchAction so that unspecified() is called if there is no parameter - reported by George Jempty

Modified:
    struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/MappingDispatchAction.java

Modified: struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/MappingDispatchAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/MappingDispatchAction.java?view=diff&rev=480570&r1=480569&r2=480570
==============================================================================
--- struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/MappingDispatchAction.java (original)
+++ struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/MappingDispatchAction.java Wed Nov 29 05:39:37 2006
@@ -126,8 +126,7 @@
  * Also, a request parameter, which would be visible to the application user,
  * is not required to enable selection of the handler method. </p>
  *
- * @version $Rev$ $Date: 2005-05-14 21:27:02 -0400 (Sat, 14 May 2005)
- *          $
+ * @version $Rev$ $Date$
  * @since Struts 1.2
  */
 public class MappingDispatchAction extends DispatchAction {
@@ -191,6 +190,23 @@
         log.error(message);
 
         throw new ServletException(message);
+    }
+
+    /**
+     * <p>Returns the parameter value.</p>
+     *
+     * @param mapping  The ActionMapping used to select this instance
+     * @param form     The optional ActionForm bean for this request (if any)
+     * @param request  The HTTP request we are processing
+     * @param response The HTTP response we are creating
+     * @return The <code>ActionMapping</code> parameter's value
+     */
+    protected String getParameter(ActionMapping mapping, ActionForm form,
+        HttpServletRequest request, HttpServletResponse response)
+        throws Exception {
+
+        return mapping.getParameter();
+
     }
 
     /**