Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write element of array of strings with <bean:write>

Status
Not open for further replies.

pajakleon

Programmer
May 17, 2005
4
0
0
PL
<logic:present name="persons">
<.table>
<logic:iterate id="person" name="persons">
<.tr>
<.td>Name:<bean:write ??? /><./td>
<.td>Age: <bean:write ???/><./td>
<./tr>
</logic:iterate>
<./table>
</logic:present>

persons is a List of Object[]
person is Object[] (person[0] - name, person[1] - age)

I would like to wirte in first <.td> pesron[0] and in second <.td> person[1];

My question is how to write person[0] and person[1] with <bean:write>? Or if it is impossible to use <bean:write> in this case, what tag should i use?
 
try this:

<%@page isELIgnored="false"%>
...
...

<logic:present name="persons">
<.table>
<logic:iterate id="person" name="persons">
<.tr>
<.td>Name:${person[0]}<./td>
<.td>Age: ${person[1]}<./td>
<./tr>
</logic:iterate>
<./table>
</logic:present>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top