I get an error message in JSP and I cannot figure out what causes it. I have included all the relevant libraries, and I have necessarily complied with the bean convention for uppercase / lowercase letters. Here is the relevant code in the JSP:
<c:forEach items="${relevantData}" var="entry"> <p>${entry.price}</p> </c:forEach>
relevantData was List<MyData> . For the purposes of this question, it suffices to say that MyData is a class that contains a price called Double (using Getter and Setter following the bean convention). When I try to load this page, I get the following error in the server logs (Tomcat 7.0.22):
javax.el.PropertyNotFoundException: Property 'price' not readable on type java.lang.Double
Why am I getting this error and how to fix it?
java jsp el jstl netbeans
Wallace brown
source share