I have the following array:
List<HashMap<String, String>> array = new ArrayList<HashMap<String, String>>();
[{name=BIRTH_DATE}, {catVal=07.11.2011}, {catStat=162}, {catVal=30.04.2011}, {catStat=108}, {CatVal=26.01.2011}]
I'd like to use JSTL to choose between name, catVal and CatStat. I've tried the following, but it doesn't work. How can I get the key?
<table border="1">
<c:forEach items="${xml}" var="map">
<tr>
<c:choose>
<c:when test="${map.key =='name'}">
<td>${map.name}</td>
</c:when>
<c:when test="${map.key == 'catVal'}">
<td>${map.catVal}</td>
</c:when>
<c:when test="${map.key == 'catStat'}">
<td>${map.catStat}</td>
</c:when>
</c:choose>
</tr>
</c:forEach>