struts2 配置错误There is no result type defined for type 'json'
2011-08-11 15:23
916 查看
之前在很多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 ,看到别人的博客中说这两个只能有一个要不就该冲突了,当时很庆幸,就导了其中一个,发现还是报错,最后找啊找,终于发现了错误的地方了
就是上面的这个extends ,默认的是继承struts-default,所以这里也需要修改,最后问题解决了。
<package name="ajaxkpi" extends="json-default"> <action name="getTeamByCounty" class="relationAction" method="getTeamByCounty"> <result type="json" /> </action>
就是上面的这个extends ,默认的是继承struts-default,所以这里也需要修改,最后问题解决了。
相关文章推荐
- Struts2 错误:There is no result type defined for type 'json' mapped with name 'success'.
- struts2 配置错误There is no result type defined for type 'json'
- There is no result type defined for type 'json' mapped with name 'success'.
- Caused by: There is no result type defined for type 'json' mapped with name 'rebback'. Did you mean
- There is no result type defined for type 'json' mapped with name 'success'.
- struts2整合json出现no result type defined for type 'json'的解决方法
- ssh--添加json后,初始化配置一直显示There is no result type defined for type 'json' mapped with name
- struts2整合json出现no result type defined for type 'json'的解决方法
- Struts2 使用ajax访问action,返回json格式数据,提示error:There is no result type defined for type 'json'
- struts2整合json出现no result type defined for type 'json'的解决方法
- There is no result type defined for type 'json' mapped with name 'success'
- There is no result type defined for type 'json'...
- There is no result type defined for type 'json' mapped with name 'success'.
- here is no result type defined for type 'plaintext'解决
- Caused by: There is no result type defined for type 'json' mapped with name 'success'. Did you mean
- SSH搭建遇到的问题---There is no result type defined for type 'json' mapped with name 'success'.
- SSH 报 There is no result type defined for type 'json' mapped with name 'success'. 错
- struts中使用json,报错There is no result type defined for type 'json' mapped with name 'success'.
- There is no result type defined for type 'json' mapped with name 'success'.
- 解决 C++错误 error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no