Struts <nested:xxx> tags are used for two purposes:
- to iterate through and display content of nested beans
- to generate proper names of input elements, so these name could be parsed on input phase
JSTL <c:forEach> helps to iterate and display content of nested beans only, because JSTL is positioned as render-only technology. Therefore choosing JSTL <c:forEach> tag over Struts <nested:xxx> tags is not an obvious choice.
Code samples by Rick Reumann.
List of Department POJOs. Each Department has a List of Employees. Department properties: List employees, String deptName Employee properties: String empName, String email
Struts <nested:xxx> tags
- Struts Nested – Rick Reumann