Struts2 错误:There is no result type defined for type 'json' mapped with name 'success'.
2011-10-10 15:46
821 查看
错误描述:
Caused by: There is no result type defined for type 'json' mapped with name 'success'. Did you mean 'json'? - result - file:/D:/Workspaces/MyEclipse%208.5/oam/target/classes/performance.xml:23:25
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
... 26 more
然后查看, performance.xml的是否正确,源码如下
图中明示的问题为struts-default,因为在struts.xml文件中已经定义了包default,并且在该包中定义了json这一结果,因此package performance的扩展包必须是default,修改后问题解决
分析出错原因:
对Struts2的配置文件不了解
Caused by: There is no result type defined for type 'json' mapped with name 'success'. Did you mean 'json'? - result - file:/D:/Workspaces/MyEclipse%208.5/oam/target/classes/performance.xml:23:25
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
... 26 more
然后查看, performance.xml的是否正确,源码如下
<package name="performance" namespace="/performance" extends="struts-default"> <action name="accountpage" class = "com.dice.voip.web.oam.base.BaseAction"> <result>/performance/systemaccount.jsp</result> </action> <action name="accountinfos" class="com.dice.voip.web.oam.actions.SysInfoAccountAction"> <result type="json"></result> </action> </package> </struts>
图中明示的问题为struts-default,因为在struts.xml文件中已经定义了包default,并且在该包中定义了json这一结果,因此package performance的扩展包必须是default,修改后问题解决
分析出错原因:
对Struts2的配置文件不了解
相关文章推荐
- 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'.
- Caused by: There is no result type defined for type 'json' mapped with name 'rebback'. Did you mean
- SSH搭建遇到的问题---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'.
- 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 'success'. Did you mean
- There is no result type defined for type 'json' mapped with name 'success'.
- struts2 配置错误There is no result type defined for type 'json'
- struts中使用json,报错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'. 错
- ssh--添加json后,初始化配置一直显示There is no result type defined for type 'json' mapped with name
- struts2 配置错误There is no result type defined for type 'json'
- Struts2 使用ajax访问action,返回json格式数据,提示error:There is no result type defined for type 'json'
- There is no Action mapped for namespace [/] and action name [accoutLogin] associated with context path [/cloudclick].Struts2错误
- struts2配置错误 There is no Action mapped for namespace [/] and action name [] associated with context
- struts2整合json出现no result type defined for type 'json'的解决方法
- struts2整合json出现no result type defined for type 'json'的解决方法
- struts2整合json出现no result type defined for type 'json'的解决方法
- 关于struts2总是报There is no Action mapped for namespace / and action name login错误的一点经验