您的位置:首页 > 移动开发

There is no result type defined for type 'json' mapped with name 'success'.

2016-07-06 20:43 639 查看


There is no result type defined for type 'json' mapped with name 'success'.  

2012-10-10 15:25:12|  分类: 学习笔记 |  标签:json  json错误  result  type=  ajax和struts2  |举报|字号 订阅

    





  下载LOFTER我的照片书  |

在struts2使用ajax时,配置result时需要配置其type为json。当添加了json-lib-2.3-jdk15.jar和struts2-json-plugin-2.3.4.1.jar两个包时,仍然还会报错:There is no result type defined for type 'json' mapped with name 'success'.在网上查了很多资料,说少了其他什么包,但试了都没用,主要可能struts版本不同。这里其实是需要修改struts.xml中的<package中的
extends="struts-default"为 extends="json-default"即可解决此错误。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: