Radio buttons and checkboxes that are checked when the form that contains them is submitted will send a name/value pair to the server. Radio buttons and checkboxes that are unchecked will send nothing.
Form parameters are retrieved with the HttpServletRequest.getParameter(
String) method; the String argument being the name.
If the name argument doesn't match any form parameters, getParameter will return null.
This means that calling getParameter will return null if the radio button or checkbox is unchecked. If a checkbox or radio button is checked, then calling getParameter with that object's name will return a value.
When generating the HTML for a radio button or checkbox, adding the attribute "checked" will cause that button or checkbox to be checked.
Example:
<input type="checkbox" name="someCheckbox" checked />