我有这个堆栈,我试图找到我的错误,但是我找不到。
当我打印有效复选框时,无论是否选中,该值为null。
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label><input type="checkbox" name="checkboxconfirm" >
<p style="color:Blue;">I agree to the terms and
conditions</p</label>
</div>
</div>
</div>
boolean validcheckbox = request.getParameter("checkboxconfirm");
out.println("<b>checkbox: </b>" + validcheckbox + "<br>");