Did you get what you were looking for?
In this example,
creditLimit is the key to a value inside a HashMap residing in someBean
=============================================
JSP Code
<bean:write name="someBean" property="keyedData(creditLimit)"/>
=============================================
Java Code snippet from the someBean's class
private HashMap keyedData;
.
.
.
public String getKeyedData(String key)
{
return (String) keyedData.get(key);
}
=============================================
Hope this helps, Felicia
-----Original Message-----
From: Gideon, Thomas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 4:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Bean with HashMap in JSP
> -----Original Message-----
> From: Knoernschild, Kirk W [mailto:[EMAIL PROTECTED]]
>
> I have a display bean that has within it a variable of type
> HashMap. From within the JSP, instead of iterating over the
> values of the HashMap, I *need* to access the individual
> values based on the key. Anyone have any pointers on how to do this?
Have you thought about installing JSTL 1.0? The EL syntax to do this with
the <c:out/> tag is pretty straightforward.
Thomas Gideon
Sr. Software Developer
B2eMarkets
301.230.2236 Tel.
301.230.2248 Fax.
[EMAIL PROTECTED]
www.B2eMarkets.com
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>