Entity:
package entity;
import java.io.Serializable;
public class Authors implements Serializable {
private String AuthFirstName;
public Authors() {
}
public String getAuthFirstName() {
return AuthFirstName;
}
public void setAuthFirstName(String AuthFirstName) {
this.AuthFirstName = AuthFirstName;
}
}
Servlet:
List listAuthors = authDAO.findAuthors();
request.setAttribute("lista", listAuthors);
JSP:
<c:forEach var="var" items="${lista}">
<c:out value="${var.AuthFirstName}"/>
</c:forEach>
Exception:
javax.el.PropertyNotFoundException: Property 'AuthFirstName' not found on type entity.Authors
How is this caused and how can I solve it?
It should start with lowercase.
<c:out value="${var.authFirstName}" />
Further, it would also be nice to fix the underlying property name to start with lowercase as well, although it does functionally not harm.
private String authFirstName;