Transmission Method Arguments in EL - This is only the EL specification supported in EL 2.2. EL 2.2 is shipped by default in Servlet 3.0 / JSP 2.2 containers. Therefore, if you use the Servlet 3.0 container (Tomcat 7, Glassfish 3, JBoss 6, etc.), and your web.xml declared compatible with the Servlet 3.0 spec, then you should have access to it as follows
${bean.getFieldInfo('fieldName')}
Since you explicitly mentioned JSP 2.0, which is part of the old Servlet 2.4 specification, I assume there is no room for updating. Itβs best to replace the method with
public Map<String, FieldInfo> getFieldInfo() {
so that you can access it as follows
${bean.fieldInfo.fieldName}
or
${bean.fieldInfo['fieldName']}
or
${bean.fieldInfo[otherBean.fieldName]}
Balusc
source share