I am new to JSTL, I understand that to get field value we can use the following code:
<c:out value="${empDetails.id}" />
<c:out value="${empDetails.name}" />
<c:out value="${empDetails.dept}" />
<c:out value="${empDetails.locn}" />
I have a requirement to get the list of property names to be shown in UI in an arrayList, in JSP I want to iterate and get the value from empDetails.
I want to write something like below:
<c:forEach items="${list}" var="item">
<c:out value="${empDetails}" property="${item}/>
</c:forEach>
The List will contain values "id","name", "locan", "dept" etc.
Could some one please help how to do it?