public class Test {
public static String NAME = "nametom";
public static String test(){
return "testtom";
}
}
在struts.xml配置文件中加<constant name="struts.ognl.allowStaticMethodAccess" value="true"></constant>
<s:property value="@Test@test()"/>
<s:property value="@Test@NAME"/>