我的阿贾克斯电话:
$.ajax({
type: "POST",
url: "DataDictionaryAjax.do",
dataType: "xml",
async: false,
success:function(data){
var form = data;
}
});
我的回应是 xml
Content-Type:xml;charset=UTF-8
Date:Mon, 01 Apr 2013 18:45:29 GMT
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked
xml 很长,但我已经确认它格式正确。
servletResponse.setContentType("xml");
String xml = "<?xml version='1.0' encoding='UTF-8'?>" + Formdata;
servletResponse.getWriter().print(xml);
return null;
}
我的 ajax 成功并没有被解雇。