发现问题:无法访问静态方法。这种配置在Struts2.0中是可以访问静态方法的,但是到了2.1版本,却无法访问。需要对struts.xml做如下修改:
<constantname="struts.ognl.allowStaticMethodAccess"value="true"></constant>
该常量可以在struts2的核心jar包的org.apache.struts2包中的static文件夹中的default.properties的最后定义,默认取值为false,所以因为这个默认配置导致ognl不允许访问静态方法。
经过这个常量的配置后,ognl不能访问静态方法的问题解决。