struts2 配置错误There is no result type defined for type 'json'

        之前在很多struts2的配置中看到  <result type="json"></result> ,然后自己就也试试用,发现直接运行错误,报There is no result type defined for type 'json' 然后呢去搜了搜发现要添加jsonplugin-0.33.jar  然后报到下的struts里却发现了struts2-json-plugin-2.2.1.1.jar ,看到别人的博客中说这两个只能有一个要不就该冲突了,当时很庆幸,就导了其中一个,发现还是报错,最后找啊找,终于发现了错误的地方了
<package name="ajaxkpi" extends="json-default">
	<action name="getTeamByCounty" class="relationAction" method="getTeamByCounty">
		<result type="json" />
	</action>

就是上面的这个extends ,默认的是继承struts-default,所以这里也需要修改,最后问题解决了。

你可能感兴趣的:(json,struts,Class)