Pass integer value from a checkbox on JSP to the server

How to pass integer value from a checkbox on JSP to the server?
None of the following 3 checkboxes will pass an integer to the server.
The server receive “k” or “$k” but not 1, 2, 3, …
<td><input type=“checkbox” name=“choice” value=“k”>Data</td>
<td><input type=“checkbox” name=“choice” value=“$k”>Data</td>
<td><input type=“checkbox” name=“choice” value=k>Data</td>

The JSP page is:
<c:set var=“k” value=“0”/>
<c:forEach items=“${model.data}” var=“data”>
<tr>
<c:forEach items=“${data}” var=“datavalue”>
<td style=“font-family:monospace”>${datavalue}</td>
</c:forEach>
<td><input type=“checkbox” name=“choice” value=“k”>Data</td>
<c:set var=“k” value=“$(k+1)”/>
</tr>
</c:forEach>

in this line:
<td><input type=“checkbox” name=“choice” value=“k”>Data</td>

Your value=“k” should be value=“${k}”

But instead of using a variable, the forEach has a built in counter. You can do

<c:forEach items=“${model.data}” var=“data” varStatus=“status”>
<c:out value=“${status.count}”/>
</c:forEach>

Where status.count will be the loop count. Status has some other properties but I forget what they are.