I need to retrieve values from a map of type Map <String, String>
in jsp based on a condition. The condition is to compare map key with variable and if the key equals the variable show the value pertaining to that key. Here's what I am doing:
<c:if test="${ myMap.key eq myVariable }">
<jsp:getvalueof var="testVariable" value = "${ myMap.value }" />
</c:if>
What I am expecting to get is if the myMap.key equals myVariable, I should get the value pertaining to that key in "test" variable.
But this thing is not working. Please any idea anyone?
Thanks in advance :)