title: Submit checkbox values Spring MVC
body: <p>Maybe this question was asked a lot but not in the same way so here is my problem and I hope someone can help.</p>
  
  <p>After having retrieved some research rows from database and returned the results into a <code>List</code> which I have bound to the my Spring MVC <code>Controller</code> <code>Model</code>: </p>
  
  
  
  <pre><code>if(!result.hasErrors())
  {
    try{
      List&lt;Question&gt; questionlist = questionservice.findByCategoryAndLevel(questionform.getCategory(),questionform.getLevel());
      model.addAttribute("questionlist",questionlist);
      return "addExam";
    }catch(NullPointerException e)
    {
      return "redirect:/admin/addexam";
    }
  }
  </code></pre>
  
  <p>Here is my view:</p>
  
  
  
  <pre><code>&lt;form:form action="addexam" method="POST" modelAttribute="questionlist"&gt;
    &lt;table class="table table-striped table-bordered table-hover" id="sample_1"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th class="table-checkbox"&gt;
            &lt;input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/&gt;
          &lt;/th&gt;
          &lt;th&gt;
            Category
          &lt;/th&gt;
          &lt;th&gt;
            level
          &lt;/th&gt;
          &lt;th&gt;
            Type of question
          &lt;/th&gt;
          &lt;th&gt;
            Status
          &lt;/th&gt;
          &lt;th&gt;
            &amp;nbsp;
          &lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;c:forEach items="${questionlist}" var="question"&gt;
          &lt;c:choose&gt;
            &lt;c:when test="${question.isVisible()}"&gt;
              &lt;tr class="odd gradeX"&gt;
                &lt;td&gt;
                  &lt;input type="checkbox"  class="checkboxes" /&gt;
                &lt;/td&gt;
                &lt;td&gt;
                  ${question.category.getCategoryName() }
                &lt;/td&gt;
                &lt;td&gt;
                  ${question.level }
                &lt;/td&gt;
                &lt;c:choose&gt;
                  &lt;c:when test="${question.isSingleChoiceQuestion() }"&gt;
                    &lt;td&gt;Question à choix unique&lt;/td&gt;
                  &lt;/c:when&gt;
                  &lt;c:otherwise&gt;
                    &lt;td&gt;Question à choix mutiple&lt;/td&gt;
                  &lt;/c:otherwise&gt;
                &lt;/c:choose&gt;
                &lt;td class="center"&gt;
                  &lt;c:choose&gt;
                    &lt;c:when test="${question.getState() == 'Desactivated'}"&gt;
                      &lt;span class="label label-sm label-default"&gt; Desactivated &lt;/span&gt;
                    &lt;/c:when&gt;
                    &lt;c:when test="${question.getState() == 'Activated'}"&gt;
                      &lt;span class="label label-sm label-success"&gt; Activated &lt;/span&gt;
                    &lt;/c:when&gt;
                    &lt;c:when test="${question.getState() == 'Pending'}"&gt;
                      &lt;span class="label label-sm label-warning"&gt; Pending &lt;/span&gt;
                    &lt;/c:when&gt;
                  &lt;/c:choose&gt;
                &lt;/td&gt;
                &lt;td&gt;
                  &lt;a href="${pageContext.request.contextPath }/admin/question?view=${question.idQuestion}" class="btn btn-xs btn-default" target="_blank"&gt;View&lt;/a&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
            &lt;/c:when&gt;
          &lt;/c:choose&gt;
        &lt;/c:forEach&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>Now how do I submit the selected items?</p>