struts2.1访问静态方法需配置OGNL
struts2.1访问静态方法需配置OGNL
如题,struts2.1 OGNL访问静态方法需要在struts.xml里边配置:
默认是false,可以在struts2-core-2.1.6.jar下org.apache.struts2里的default.properties里边查看到。
页面OGNL访问方式为:<s:property value="@类名@方法名"/>
---------
顺带:
访问Math类静态方法:<s:property value="@@方法名"/>如:<s:property value="@@max(2,3)"/>
<s:debug></s:debug>