title: Spring MVC: Error 400 The request sent by the client was syntactically incorrect
body: <p>This seems to be a common issue. I have gone all the answers given in SO but could not make it work.<br/>I am trying to integrate Spring MVC+Freemarker in already existing web application. It works fine for the <code>GET</code> request and Freemarker Template reads java object provided by Controller without any issue.<br/>
  But Form submission is not able to hit Controller method. Finally I made log4j work. Here is the error I am getting:<br/>
  <strong>Error</strong></p>
  
  <pre><code>    HandlerMethod details: 
      Controller [application.entry.controller.UserController]
      Method [public void application.entry.controller.UserController.handleSave(java.lang.String)]
  
      org.springframework.web.bind.MissingServletRequestParameterException: 
  Required String parameter 'action' is not present
  </code></pre>
  
  <p><br/><strong>Freemarker:</strong></p>
  
  <pre><code>&lt;form method="POST" action="save.html"&gt;
    ------------
    &lt;input type="submit" class="btnnew" name="saveWithoutValidation" value="Save Without Validation"&gt;&lt;/input&gt;
    &lt;input type="submit" class="btnnew" name="submit" value="Submit"&gt;&lt;/input&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>context-root is <strong>PORTAL</strong>.<br/>
  <strong>spring-servlet.xml</strong></p>
  
  <pre><code>&lt;bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"&gt;
        &lt;property name="cache" value="true"/&gt;
        &lt;property name="prefix" value=""/&gt;
        &lt;property name="suffix" value=".ftl"/&gt;
  </code></pre>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;servlet&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.springframework.web.servlet.DispatcherServlet
          &lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>@RequestMapping(value="/save", method=RequestMethod.POST)
      public void handleSave(@RequestParam String action){
  
          if( action.equals("submit") ){
              System.out.println("Damn! You clicked submit");
          }
          else if( action.equals("saveWithoutValidation") ){
             System.out.println("Sweet! You want no string attached.");
          }
  
      }
  </code></pre>
  
  <p>For logs I have tried to add <code>log4j.logger.org.springframework.web=DEBUG</code> to my existing log4j.properties but it didn't work.</p>