struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Floor" <>
Subject Re: [S1] access values of a Map
Date Wed, 01 Aug 2007 10:26:19 GMT
On 8/1/07, Alexander Jede <> wrote:
> Hallo,
> me bean has a Map attribute.
> Now I want to get access to the values of the Map. But I do not want
> iterate throw the entire Map. In Java I would write something like:
> map.get("key")
> What is the best way to do this in my JSP with struts 1.3.8 ?

I believe you can access indexed properties with bean:write through
the property attribute.
<bean:write name="yourbeanhere" property="yourindexedpropert[0]"/>

I believe this because the struts documentation tells me so. ;)

Obviously you don't want [0] but something that lets you select
whatever index you want at the time. I'll leave that as an exercise
for the reader.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message