在struts2的配置中看到 <result type="json"></result>,启动项目后,发现后台直接运行错误,
[com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]2013-05-18 10:17:59,232 [localhost-startStop-1]
[DEBUG] - The result type [org.apache.struts2.json.JSONResult] doesn't have a default param [DEFAULT_PARAM] defined!
[com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]java.lang.NoSuchFieldException: DEFAULT_PARAM
at java.lang.Class.getField(Class.java:1539)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:569)
at...
和There is no result type defined for type 'json' ,将struts2-json-plugin-*.jar的版本号又2.1.8升级成2.1.16就ok拉!
- <package name="/" extends="json-default">
- <action name="aname" class="relationAction" method="getTeamByCounty">
- <result name=“list” type="json" />
- </action>