ITeye博客

struts2.1访问静态方法需配置OGNL

hank4ever · 2012-07-01 19:38 · java · struts2.0 · Web前端 · Markdown

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>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。