Only the values from the checkboxes which are checked will be sent to the servlet. Retrieve the values using getParameterValues(
String).
For example, given this snippet of HTML
<form>
<input type=checkbox name=Test value=1>One
<input type=checkbox name=Test value=2>Two
<input type=checkbox name=Test value=3>Three
</form>
If the user checked the boxes labelled One and Three, then this code in your servlet
String[] values = req.getParameterValues("Test");
will result in values being a 2 element String array such that one element will be "1" and the other element will be "3".