I have the following code: detailsMap is map of LinkedHashMap type. I am able to get the value ${roleType} as L1, correctly printing the value of ${detailsMap["L1"]} but not ${detailsMap[roleType]}. Please suggest what I am doing wrong. roleTypes are enum values.
<c:set var="detailsMap" value="${hostDetails.value}" />
<c:forEach items="${roleTypes}" var="roleType">
<td>${detailsMap[roleType]}</td>
<td>${detailsMap["L1"]}</td>
<td><input type="text" name="${roleType}" value="" /></td>
</c:forEach>
</tr>
</c:forEach>
I made it working by setting the attribute as String List in place of enum Values.