if you wanna call the getter method from a specific bean using a dynamic key you use like that:
${bean[getterName]}
but if you wanna call double nested, or triple nested properties with a dynamic name how does it works, is it possible?
${bean.propertyA.propertyB} WORKS
${bean[propertyA.propertyB]} DOES NOT WORKS
<c:set var="dynamicKey" value="propertyA.propertyB" />
${bean[dynamicKey]} DOES NOT WORKS
UPDATE:
For now we're handling like that:
<c:forTokens items="${property}" delims="." var="item">
<c:set var="value" value="${value[item]}" />
</c:forTokens>
After 2 years we are leaving like this since it does not seems to have a big impact on performance.
<c:forTokens items="${property}" delims="." var="item"> <c:set var="value" value="${value[item]}" /> </c:forTokens>