c:forEach throws javax.el.PropertyNotFoundException: Property 'foo' not found on type java.lang.String
Solution 1:
Here,
<c:forEach var="statusHistory" items="statusHistoryList">
You're supplying the items
attribute of <c:forEach>
with a plain vanilla String with a value of "statusHistoryList"
which in turn indeed doesn't have a getTimestamp()
method.
You need to reference it using an EL expression ${...}
instead.
<c:forEach var="statusHistory" items="${statusHistoryList}">
${statusHistory.timestamp}
</c:forEach>