Caused by: There is no result type defined for type 'json' mapped with name 'rebback'. Did you mean

这个问题搞得很疼

 

<package name="ajax" extends="struts-default,json-default">
	<action name="checkname" class="DiaryAction.CheckName" >
			<result type="json" name="rebback"></result>
		</action>
	</package>

之后一直运行都出现如下错误,整了几个小时,最后才发现自己傻了,在此提醒下各位软件猿童鞋,别再犯这个错误。

Caused by: There is no result type defined for type 'json' mapped with name 'rebback'. Did you mean 'json'? - result - file:/C:/Users/toshiba/Workspaces/MyEclipse%209/.metadata/.me_tcat/webapps/MyPersonalByStruts/WEB-INF/classes/struts.xml:59:39at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:621)at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)


解决方案:

                 很简单,导入一个名为struts2-json-plugin-2.1.8.1.jar的包即可

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