title: how to pass checkbox value from jsp to java class
body: <p>I have in my jsp page some checkbox and I want to pass in my spring controller the checked ones.</p>
  
  <p><strong>insertTaskInformation.jsp</strong></p>
  
  <pre><code>&lt;body&gt;
      &lt;div align="center"&gt;
  
  
          &lt;strong&gt; &lt;strong&gt;Title:&lt;/strong&gt;${task.title} &lt;form:form
                  action="addSymbol" method="post" name="catch"&gt;
  
                  &lt;c:forEach var="symbol" items="${symbols}"&gt;
                  &lt;input type="checkbox" name="id" value="${symbol.type} }"&gt;${symbol.type}&lt;BR&gt;
                  &lt;/c:forEach&gt;
  
                  &lt;input type="submit" value="Submit"&gt;
              &lt;/form:form&gt;
  
  
  
          &lt;/strong&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>taksController.java</strong></p>
  
  <pre><code>@RequestMapping(value="/addSymbol", method = RequestMethod.POST)
      public String addSymbol() {
  
  
  
          return "administration/taskRecap";
  
  
      }
  </code></pre>