title: Retrieve multiple checkbox values from jsp in the spring controller class
body: <p>In my table, I've a row with checkbox which tells the controller whether that particular row of the table has to be included or no. The check box does not have relation with other rows. I tried adding it in the following way :</p>
  
  <pre><code>&lt;form:form id="fee" method="post" modelAttribute="clientForm" commandName = "clientForm" 
  action="&lt;%= request.getContextPath().toString()%&gt;/addFee.do"&gt;
  
      &lt;TABLE&gt;
              &lt;tr&gt;
                  &lt;c:forEach var="type" items="${clientInfo}" varStatus="status"&gt;
                      &lt;td&gt;&lt;form:checkbox class="editable${ifeeCount}" path="includeFeeValue" value="false"/&gt; &lt;/td&gt;
                          &lt;td&gt;feeType&lt;c:out value = "${status.index}"/&gt;&lt;/td&gt;
                          &lt;td&gt;Source Fee&lt;c:out value = "${status.index}"/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;form:input class="editable${ifeeCount}" disabled="true" path="overriddenFee" /&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;form:errors path="overriddenFee" cssClass="error" /&gt;&lt;/td&gt;
                  &lt;/c:forEach&gt;
              &lt;/tr&gt;
      &lt;/TABLE&gt;
  </code></pre>
  
  <p></p>
  
  <p>And in my form, I've a list <code>private ArrayList&lt;String&gt; includeFeeValue;</code></p>
  
  <p>And i'm trying to retrieve this in the spring controller class as follows :</p>
  
  <pre><code>@RequestMapping(value="/addFee.do",method = RequestMethod.POST)
  protected @ResponseBody ModelAndView selectValues(@ModelAttribute("clientForm") PaswFeeMaintenanceForm MyMaintForm ) throws Exception {
  
      for(int i=0;i&lt;MyMaintForm.getIncludeFeeValue().size();i++){
          System.out.println("Checkbox : "+MyMaintForm.getIncludeFeeValue().get(i)+ " of "+i);
      }
  }
  </code></pre>
  
  <p>Once I submit my form, it throws <code>null pointer exception</code> in here : <code>MyMaintForm.getIncludeFeeValue().size()</code> .</p>
  
  <p>Could you tell me what's missing here?</p>