here is source code. In my javascript function I use jquery to make a ajax call. myurl is a jsp in localhost which will output a xml. However i got status 0(not 200). What happen? $.ajax({ type:"POST", url:myurl, data: params, complete:function(XMLHttpRequest,textStatus){ alert("respons status "+XMLHttpRequest.status+" content: "+XMLHttpRequest.responseText+" header: "+XMLHttpRequest.getAllResponseHeaders());
} }); Here is the jsp: <%response.setContentType("text/xml"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); String ajaxRs="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; ajaxRs=ajaxRs+"<response>"; ajaxRs=ajaxRs+"<message>test!</message>"; ajaxRs=ajaxRs+"</response>"; System.out.println(ajaxRs); response.getWriter().write(ajaxRs); %> backend is websphere+ db2. Can anybody help me? Thanks a lots!