日期:2014-05-16 浏览次数:20428 次
class TestClass {
public String getName() {
// 在这里就可以取得你想要的资源了,数据库或者属性文件,都可以
// 为了举例方便,这里只返回一个简单的字符串
String result = "this is new name";
return result;
}
}
<s:bean name="com.test.TestClass" id="myObject"/>
<s:property value="#request.myObject.name"/>