ExtJs 4 的filefield上传后 返回值success接受不正常

问题解决了,我修改了返回类型为setContentType("text/html")可以正确解析了,感到很奇怪,其他的地方使用
setContentType("application/Json")都没问题,就上传的返回有问题了。
success:function(){}这里的解析是extJS解析收到的返回json后才会执行的,如果你的json字符串有问题,这里是不会执行的,好了结贴了。

try {
			ServletActionContext.getResponse().setCharacterEncoding("utf-8");
			ServletActionContext.getResponse().setContentType("text/html");  
			if(success==true){
				ServletActionContext.getResponse().getWriter().write("{"success":true}");
			} else {
				ServletActionContext.getResponse().getWriter().write("{"success":false}");
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

 struts2的配置不在配返回值

原文地址:https://www.cnblogs.com/anyhow/p/3912141.html