json这个result type是在json-default (struts2-json-plugin-2.1.8.1.jar\struts-plugin.xml)里面定义的,内容如下(省去了xml和doctype标签):
可见,name为"json"的result type是在json-default中定义的,所以,从json-default继承就可以使用json这个result。另外json-default还定义了一个name为"json"的interceptor。
本文转自 艺晨光 51CTO博客,原文链接:http://blog.51cto.com/ycgit/1749634,如需转载请自行联系原作者