I want to know how to pass the code below to jstl changing the name according to index.
List<Map> inventariozonas = new ArrayList<Map>();
for(int i = 1; i < 20; i++){
Map r3 = new HashMap();
r3.put("puntoventa", "puntoventa"+i);
inventariozonas.add(r3);
}
I've been trying to get values in HTML by JSTL but I don't know how to get them dynamically due every variable has a different name.
With the code below just repeat the same value.
<c:forEach items="${inventariozonas}" var="r">
<tr>
<td>${r.puntoventa1}</td>
</tr>
</c:forEach>
Is there any possibility to do something like this:
<c:forEach items="${inventariozonas}" var="r">
<tr>
<td>${r.puntoventa+index}</td>
</tr>
</c:forEach>