title: Request parameter is null calling methods on MultiActionController
body: <p>In Spring 3.0 </p>
  
  <p>if i have a jsp page with two different links each calling different method on MultiActionController</p>
  
  <pre><code>&lt;form:form method="POST"&gt;
      &lt;a href="user.htm?action=add" style="color: blue;"&gt;Add&lt;/a&gt;
      &lt;a href="user.htm?action=delete" style="color: blue;"&gt;Delete&lt;/a&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>on the MultiActionController i get request parameter as null so cannot validate the values</p>
  
  <pre><code>String username=request.getParameter("username");
  String password=request.getParameter("password");
  </code></pre>
  
  <p>i also tried uing a button and changed it to look like a link but in case of button click add method is called twice once with requestparameter as null and second time with correct values, but this twice entry is creating a mess in the code also to make this work i am using form action which will not work in case of two different method calls</p>
  
  <pre><code> &lt;form:form action="user.htm?action=add method="POST"&gt;
       &lt;input type="submit" value="I have info"/&gt;"&gt; ---&gt; should call delete method
       &lt;input type="submit" value="Click to send info"/&gt; ---&gt; should call add method 
  
      &lt;/form:form&gt;
  </code></pre>
  
  <p>want to achieve this without javascript</p>
  
  <p>I have also set param reslover in xml file  with default method to call </p>
  
  <p>let me explain my problem again forget the above code i was just giving some example</p>
  
  <p>I have a jsp page which has two input text field and two links each should call different method of the controller both the method will validate the input and will get redirect to another page simple!! </p>
  
  <p>The reason i have using MultiActionController.......
  Unfortunately i have to continue using a controller which extends MultiActionController because the same jsp page also has paging which work absolutely fine </p>
  
  <p>So all i wan to do is simply achieve server and client side validation once either of the link is clicked and redirect accordingly.</p>
  
  <p>Please give me some example to move ahead in this... </p>
  
  <p>i want to achieve this w/o javascript i got this example here
  but my problem is why the requestParameter is Null</p>
  
  <p><a href="http://www.goospoos.com/2009/11/spri...oller-example/" rel="nofollow noreferrer">http://www.goospoos.com/2009/11/spri...oller-example/</a></p>
  
  <p>Here's my code</p>
  
  <pre><code>&lt;bean id="myExampleController" class="com.ui.controller.MyExampleController"&gt;
              &lt;property name="methodNameResolver"&gt;
              &lt;ref bean="paramResolver" /&gt;
          &lt;/property&gt; 
          &lt;property name="validators" ref="myExampleValidator"/&gt;       
      &lt;/bean&gt;
  
      &lt;bean id="paramResolver"
          class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver"&gt;
  &lt;property name="defaultMethodName" value="loadPage"&gt;&lt;/property&gt;  
  &lt;property name="paramName"&gt;
  &lt;value&gt;action&lt;/value&gt;            
  &lt;/property&gt;     
  &lt;/bean&gt;
  
  &lt;bean id="myExampleValidator" class="com.validator.MyExampleValidator" /&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public ModelAndView validateValues(HttpServletRequest request, HttpServletResponse response) throws Exception{
  ModelAndView mav=null;
  ----&gt; this is null ??? 
  String value1=request.getParameter("textvalue1");
  String value2=request.getParameter("textvalue2");
  
  
  mav = new ModelAndView("myexample");
  mav=getPageData(request, false); 
  return mav;
  
  }
  </code></pre>
  
  <p>JSP page</p>
  
  <pre><code>&lt;form action="myexample.htm" method="post"&gt;
  
  input type="text" name="textvalue1" size="20" /&gt;
  input type="text" name="textvalue2" size="20" /&gt;
  &lt;/form&gt;
  
  &lt;a href="myexample.htm?action=validateValues"&gt;click to validate&lt;/a&gt;
  </code></pre>
  
  <p>----------> what's wrong with this if the above mentioned site can call a method and works fine ,why i cannot get request parameters </p>