I am trying to add a checkbox to a jsp to accept terms and conditions before entering the site. I keep getting the same error about not having a getter method even though I do have a getter method and I don't see any typos. I don't understand what I'm missing.
login.jsp
<html:checkbox property="termsCheckbox" value="true"/>
LoginForm.java
public final class LoginForm extends ActionForm
{
private boolean termsCheckbox = false;
public void setTermsCheckbox(boolean termsCheckbox)
{
this.termsCheckbox = termsCheckbox;
}
public boolean isTermsCheckbox()
{
return termsCheckbox;
}
}
This is the error I am getting when I go to the JSP:
org.apache.jasper.JasperException: An exception occurred processing JSP page /login.jsp
at line 73
73: <html:checkbox property="termsCheckbox" title="terms" value="true"/>
javax.servlet.ServletException: javax.servlet.jsp.JspException: No getter method
for property termsCheckbox of bean org.apache.struts.taglib.html.BEAN