Call JSPX EL 2.2 Method Using EL 2.1

I have a JSP that works fine in Tomcat 7 but doesn't work in Tomcat 6, which I suppose is the fact that you cannot call methods (other than getters / setter) from EL 2.1.

The method I need to call cannot be named as the receiver.

+3
source share
1 answer

I figured out a workaround and thought I'd post an answer:

If you have Spring installed, you can use Spring EL so that you can call methods on objects

For instance:

<spring:eval expression="pic.thumbnailUrl()" var="thumbnail" />
+4
source

All Articles