为什么我在struts2框架下用ajax 总是404错误?
这是调用的action
xmlHttp.open("post","/baidu/StuNoCheck.action?stuNo=" + stuNo,true);
xmlHttp.send(null);
}
function checkStuNoCallback(){
alert(“11”);
if(xmlHttp.readyState == 4){
alert(xmlHttp.status);
if(xmlHttp.status == 200){
var text = xmlHttp.responseText;
Ajax Struts
<package name="myFirst" namespace="/baidu" extends="struts-default">
<action name="StuNoCheck" class="com.dxy.action.StuNoCheck">
<result name="success">/StudentManager/StudentManager.jsp</result>
</action>