Struts2+JSON+jQuery实现异步交互数据时选择要序列化的属性(二使用XML配置方式)
只需在XML配置就可以了,配置方式是:
- <?xml?version="1.0"?encoding="UTF-8"??>??
-
<!DOCTYPE?struts?PUBLIC?"-//Apache?Software?Foundation//DTD?Struts?Configuration?2.1//EN"?"http://struts.apache.org/dtds/struts-2.1.dtd">??
-
<struts>??
-
????<package?name="jsons"?extends="json-default"?namespace="/">??
-
????????<action?name="getJSON"?class="test.json.Users">??
-
????????????<result?name="success"?type="json">??
-
??????????????????
-
????????????????<param?name="excludeProperties"<