You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Wendy Smoak <We...@asu.edu> on 2002/10/19 00:46:15 UTC

JSTL for Maps?

I've poked around the Standard Taglib documentation, and asked Google, but
so far I can't find what I need.

I have a Hashtable in session scope.  I have a String in page scope that is
the key to something in the Hashtable.  What tag can get the value out of
the Hashtable for me?

I don't think it matters, but I'm using Struts.  (Not for this tag-- I don't
care about the value, I just need to display it in a white box.)

Currently I'm doing this, which just puts the 'key' into the readonly text
box.

<input type="text" name="junk" readonly="readonly" size="50"
value="<bean:write name="staffMember"/>"/>

The Map in session scope is called preferredNames, so somehow I need to call

   preferredNames.get(${staffMember});

Any takers?  Thanks!

-- 
Wendy Smoak
http://sourceforge.net/projects/unidbtags