Hi,
I have 2 questions, first one related to <c:forEach> & the other related to <c:if>
1)
String[] arr1={"one", "two", "three"};
String[] arr2={"1","2","3"};
Map map = new HashMap();
map.put("StringArray",arr1);
map.put("NumberArray",arr2);
request.setAttribute("map",map);
<c:forEach var="item1" items="${map}">
${item1}
</c:forEach>
This code does only the half, ie retrieves only the rows of the map.
How can we iterate through the map ?
2) <c:forEach var="item" items="one,two,three" varStatus="instance">
<c:if test="${instance.count} eq 3">
This is third instance
</c:if>
<c:if test="${item} == 'three' ">
this is three
</c:if>
</c:forEach>
The 'If' statements are not working.
Please resolve my queries.
Thanks