Husein
Husein

Reputation: 41

Convert java looping into JSTL <c:forEach>

I used java, and i want to convert it into jsp using c:forEach

 int supplierList = 40;
 for (int a = 0; a < supplierList ; a++) 
 {

 }

Here is my java code screenshoot

Upvotes: 1

Views: 149

Answers (1)

Vimukthi
Vimukthi

Reputation: 880

<c:forEach items="${bean.getFunctions()}" var="func"> <c:if test="${func.key=='Search'}"> </c:if> </c:forEach>

in here bean.getFunctions() will return a map. When looping each element will assign to var.

Upvotes: 2

Related Questions