title: Jsp send value of dynamic checkboxes to servlett
body: <p>I'm totally new in the world of html/jsp/servlett programming. Actually I'm working on a project where I create dynamic checkboxes. Each of them should have a different value.</p>
  
  <pre><code>&lt;c:forEach items="${sessionScope.camlist}" var="cam"&gt;
                    &lt;form id="updatePermission" method="post" action="&lt;%=request.getContextPath() %&gt;/PermissionHandling?operation=update_permissions&amp;id=${cam.kameraid}" &gt;
                      &lt;table&gt;
                          &lt;td&gt;${cam.kameraid}&lt;/td&gt;
                                  &lt;script&gt;
                                      console.log("${cam.kameraid}");
  
                                      &lt;/script&gt;
                          &lt;td&gt;'${cam.standort}'&lt;/td&gt;
                          &lt;td&gt;'${cam.url}'&lt;/td&gt;
                          &lt;td&gt;${cam.aufnahmeinterval}&lt;/td&gt;
                          &lt;td&gt;
                          &lt;c:set var="checked" value="false"/&gt;
                          &lt;c:forEach items="${sessionScope.permissionList}" var="perm"&gt;
                              &lt;c:if test="${perm.kameraid eq cam.kameraid}"&gt;
                              &lt;input type="checkbox" name="selection" checked="checked" value="${cam.kameraid}" onClick="callServlett()"&gt;
                              &lt;c:set var="checked" value="true"/&gt;
                              &lt;c:set var="continueExecuting" scope="request" value="false"/&gt;
                               &lt;/c:if&gt;
                          &lt;/c:forEach&gt; 
                          &lt;c:if test="${checked eq false}"&gt;
                              &lt;input type="checkbox" name="selection" value="${cam.kameraid}" onClick="callServlett()"&gt;
                          &lt;/c:if&gt;
                          &lt;/td&gt;                
                       &lt;/table&gt;
                      &lt;/form&gt;
                    &lt;/c:forEach&gt;
  
              &lt;/div&gt;
           &lt;/section&gt;
          &lt;script&gt;
  
          function callServlett()
          {
              document.getElementById("updatePermission").submit();
          }
          &lt;/script&gt;
  </code></pre>
  
  <p>So with doing that, I get a table where the checkboxes of each row are initializied depending wether a user has permissions or not.
  When a checkbox gets modified by a click I want to submit the calue of the cameraid to my servlett which handels the rest of the work.</p>
  
  <pre><code>Servlett:
  String[] selections = request.getParameterValues("selection");
  </code></pre>
  
  <p>Selections is always "3" except when I klick the first checkbox, then it's null.</p>
  
  <p>Can anyone tell me why this code doesn't work as I expect?</p>