//File: index.html
Submitting Check Boxes
Submitting Check Boxes
//File: formAction.jsp
Reading Checkboxes
Reading Checkboxes
<%
if(request.getParameter("check1") != null) {
out.println("Checkbox 1 was checked.
");
}
else {
out.println("Checkbox 1 was not checked.
");
}
if(request.getParameter("check2") != null) {
out.println("Checkbox 2 was checked.
");
}
else {
out.println("Checkbox 2 was not checked.
");
}
if(request.getParameter("check3") != null) {
out.println("Checkbox 3 was checked.
");
}
else {
out.println("Checkbox 3 was not checked.
");
}
%>
SubmitingCheckBoxJsp.zip( 89 k)