Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 JSP 在 Tomcat 7 中运行良好,但在 Tomcat 6 中无法运行,我认为这是您无法从 EL 2.1 调用方法(getter/setter 除外)的事实。
我需要调用的方法不能命名为 getter。
我想出了一个解决方法,并认为我会发布答案:
如果您安装了 Spring,您可以使用 Spring EL,以便您可以调用对象上的方法
例如:
<spring:eval expression="pic.thumbnailUrl()" var="thumbnail" />