2

HI,

Here's my dilemma. The below code is obviously wrong but it give you the idea on what I need to accomplish.

<c:forEach var="object1" items="${model.listofObjects1}">
  <tr>
    <c:forEach var="object2" items="${model.listofObjects2}">
      <td>${object1.${object2}}</td>
    </c:forEach>
  </tr>
</c:forEach>

Any ideas on how to make this look up?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
goe
  • 25
  • 2

1 Answers1

4

Use the brace notation.

<td>${object1[object2]}</td>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555