title: In Spring MVC mapped method not getting called when requestparam is not present in post
body: <p>I have three request param in my method and only if Http POST request body has all three parameters <code>availableCostTypesReturn,selectedCostTypesReturn and costTypeProgramId</code> then only this method is getting called.</p>
  
  <p>Successful POST request Body</p>
  
  <pre><code> availableCostTypesReturn=1&amp;availableCostTypesReturn=2&amp;availableCostTypesReturn=3&amp;
   availableCostTypesReturn=4&amp;selectedCostTypesReturn=5&amp;costTypeProgramId=53
  </code></pre>
  
  <p>Now if my POST request body changes to</p>
  
  <pre><code>availableCostTypesReturn=1&amp;availableCostTypesReturn=2&amp;availableCostTypesReturn=3&amp;
  availableCostTypesReturn=4&amp;availableCostTypesReturn=5&amp;costTypeProgramId=53
  </code></pre>
  
  <p>then this method is not getting invoked.</p>
  
  <pre><code>@RequestMapping(value = "/costTypes", method = RequestMethod.POST)
  public String updateCostType(
              Model model, 
              @RequestParam(value="availableCostTypesReturn")
              String[] availableCostTypesReturn,
              @RequestParam(value="selectedCostTypesReturn") 
              String[] selectedCostTypesReturn,
              @RequestParam(value="costTypeProgramId")
              int costTypeProgramId
          ) 
  </code></pre>
  
  <p>There are scenarios when only one of the availableCostTypesReturn, selectedCostTypesReturn parameter will be present.</p>
  
  <p>Modified my method signature to this 
  So how can i use the same method for this.</p>
  
  <p>I am using Spring MVC 3.0.x</p>
  
  <p>Modified my annotation signature as per answer from Tomasz Nurkiewicz</p>
  
  <pre><code>@RequestParam(value="availableCostTypesReturn", defaultValue= "", required = false)
  </code></pre>