我的Ajax电话:
$.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成功并没有被解雇。