I am getting a list 'myList' of objects in jsp. Objects I am getting belongs to e.g 'MyClass'. I want to iterate over this list through JSTL.
JSP code is below :
<c:forEach items="myList" var="element"> <tr> <td>${element.getStatus()}</td> <td>${element.getRequestType()}</td> <td>${element.getRequestedFor()}</td> <td>${element.getTimeSubmitted()}</td> </tr> </c:forEach>
I am getting exception :
00000024 WebApp E [Servlet Error]-[/requestHistory.jsp]: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /requestHistory.jsp: /requestHistory.jsp(31,6) --> JSPG0122E: Unable to parse EL function ${UserProcessRequests.getStatus()}.
Taglib I am using are :
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page isELIgnored="false"%>
There is a mistake. See this line <c:forEach items="${myList}" var="element">
. ${} around 'myList' was missing.
<c:forEach items="${myList}" var="element"> <tr> <td>${element.status}</td> <td>${element.requestType}</td> <td>${element.requestedFor}</td> <td>${element.timeSubmitted}</td> </tr> </c:forEach>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With