c:forEach throws javax.el.PropertyNotFoundException: Property 'foo' not found on type java.lang.String

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 16:47:52

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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!