在Struts2+spring的web应用中
有一个访问Action的地址:http://192.168.0.87/manager/mnewsinfopublish.html
这个地址在火狐浏览器地址输入后访问是正常的,如下图:
[img]http://dl.iteye.com/upload/attachment/569517/2ee07cb0-ee7c-3acd-8b52-efb12a34295a.jpg[/img]
但是我在另外一个页面,用JQuery的ajax来访问的时候就报错了:
JQ代码如下:
[code="java"]
$.ajax({type:'post',
url:'/manager/mnewsinfopublish.html',
data:{"newsinfoid":newsinfoid,
"languagetypeid":languagetypeid,
"title":title,
"summary":summary,
"content":content,
"keyword":keyword,
"newstype_sel0":newstype_sel0,
"newstype_sel1":newstype_sel1,
"newstype_sel2":newstype_sel2},
dataType:'json',
success: function(result){
if(result!=null){
}else{
}
}
});
[/code]
出错如下:
[img]http://dl.iteye.com/upload/attachment/569519/2bf13b34-8498-3387-813a-d40a6afeb20e.jpg[/img]