Brian McGovern wrote the following on 4/29/2005 1:38 PM:
Slightly off topic, but has anyone ever been able to get a hashtable to display 
using jstl, calling the hash's values by key.


<c:forEach items="${map} var="mapItem". <c:out value="${mapItem.key}"/> <c:out value="${mapItem.value}"/> </c:forEach>

>
> I can loop through em all just fine, but i want to be able to call
> each directly like
>
> <c:out value="${MyHash.value('keyname')}" />

Not sure what you want to do above? do you want to get the value out by using the key? If so ...

<c:out value="${map["literalNameOfKey"]}"/>

if you want the literalNameOfKeyto be a var...

<c:out value="${map[varOfKeyToLookUp]}"/>



--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to