For radio buttons, the HTML spec assumes that a given group of buttons will have the same NAME and different VALUEs; the browser makes sure that only one button per group name will be selected (at most). So you can just call request.getParameter(“groupname”).
<input type="radio" name="topping" value="cheese" checked>Cheese
<input type="radio" name="topping" value="pepperoni">Pepperoni
<input type="radio" name="topping" value="anchovies">Anchovies
If the user selects “Pepperoni” then request.getParameter(“topping”) will return the string “pepperoni”.
For lists using the
Name 1: <input type="text" name="name" value="Dick">
Name 2: <input type="text" name="name" value="Jane">