title: spring jsp error
body: <p>I am trying to make a simple login form with Spring MVC. I should say that I am new to this.The idea is that I am trying to validate the form (using a class that implements Validator interface) and if something goes wrong tu print the errors. </p>
  
  <p>The validate method is:</p>
  
  <pre><code>public void validate(Object target, Errors errors) 
  {
      ValidationUtils.rejectIfEmptyOrWhitespace(errors, "username", "required.username","Va rugam introduceti un nume de utilizator!");
      ValidationUtils.rejectIfEmptyOrWhitespace(errors, "parola", "required.parola","Va rugam introduceti o parola!");
  
  
        User user= (User) target;
        System.out.println(" a:"+user.getUsername()+" b:"+user.getParola());
  
       User u=userDAO.findByUsername(user.getUsername());
  
  
      if(u == null)
      {
          errors.reject("invalid.username","Nume utilizator incorect!");
          //System.out.println("NULL");
      }
      else if(!u.getParola().equals(user.getParola()))
      {
          errors.reject("invalid.parola","Parola incorecta!");
  
  
      }
  }
  </code></pre>
  
  <p>The problem is with my jsp page :</p>
  
  <pre><code>&lt;form:form  method="POST" commandName="user" &gt;
  &lt;form:errors path="*" cssClass="error" /&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;Username :&lt;/td&gt;
              &lt;td&gt;&lt;form:input path="username" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;form:errors path="username" cssClass="error" /&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;form:errors path="invalid.username" cssClass="error" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Password :&lt;/td&gt;
              &lt;td&gt;&lt;form:password path="parola" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;form:errors path="parola" cssClass="error" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td colspan="2"&gt;&lt;input type="submit" value="Login"&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>If I try to run this I get the error: </p>
  
  <blockquote>
    <p>org.springframework.beans.NotReadablePropertyException: Invalid property 'invalid' of bean class [pachet.dbo.User]: Bean property 'invalid' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?</p>
  </blockquote>
  
  <p>If I delete the line :</p>
  
  <pre><code>&lt;td&gt;&lt;form:errors path="invalid.username" cssClass="error" /&gt;&lt;/td&gt;
  </code></pre>
  
  <p>the line </p>
  
  <pre><code> &lt;form:errors path="*" cssClass="error" /&gt;
  </code></pre>
  
  <p>shows me the "invalid.username" error,so the error exists..maybe the path isn't right?</p>