客户端ajax请求servlet出错

时间:2014.10.23 发布人:a573089399

客户端ajax请求servlet出错

已解决问题

谷歌a573089399用户在2014.10.23提交了关于“老九门客户端ajax请求servlet出错”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-10-27T16:56:41。ajax:
functiontest(){
$.ajax({
url:"http://192.168.16.102:8090/bbs/***.page",
type:"post",
datatype:"json",
success:function(data){
alert(data.length);
},error:function(data){
alert("请求错");
}
});
}
servlet:
JSONObjectjsonList=newJSONObject();
jsonList.put("ResultList",subList);
PrintWriterout=response.getWriter();
//out.print(jsonList);
out.write(jsonList.toString());
out.close();希望大家能够帮助她。

详细问题描述及疑问:ajax:
functiontest(){
$.ajax({
url:"http://192.168.16.102:8090/bbs/***.page",
type:"post",
datatype:"json",
success:function(data){
alert(data.length);
},error:function(data){
alert("请求错");
}
});
}
servlet:
JSONObjectjsonList=newJSONObject();
jsonList.put("ResultList",subList);
PrintWriterout=response.getWriter();
//out.print(jsonList);
out.write(jsonList.toString());
out.close();期待您的答案,希望你能感受到,我最真诚的谢意 !

希望以下的回答,能够帮助你。

第1个回答

用户名:78456545  

URL写错吧