这是调用的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;
正常能打印出11 说明就是调用不到我的action
下面试我struts2xml的配置 而且运行时什么错也不报<package name="myFirst" namespace="/baidu" extends="struts-default">
<action name="StuNoCheck" class="com.dxy.action.StuNoCheck">
<result name="success">/StudentManager/StudentManager.jsp</result>
</action>AjaxStruts
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;
正常能打印出11 说明就是调用不到我的action
下面试我struts2xml的配置 而且运行时什么错也不报<package name="myFirst" namespace="/baidu" extends="struts-default">
<action name="StuNoCheck" class="com.dxy.action.StuNoCheck">
<result name="success">/StudentManager/StudentManager.jsp</result>
</action>AjaxStruts
解决方案 »
- 求一hibernate关联查询语句!!!!!
- 请各位大侠,谈谈自定义表单的想法
- 帮我看看为什么图片显示不出来??
- 对IFrame,如何使mapping.findForward指向的页面成为当前主页面?
- nokia mobile browse 不能显示汉字!不知道是怎么回事?
- 急急急,谁可以帮忙一下 急这用 过年都不安心啊
- 关于javamail发邮件的一个问题
- OA系统源代码,要的快快看一下
- 我想用http://192.168.1.1/index.jsp访问c:\bea\usr_projects\domains\mydomain\applications\mid\index.jsp,该如何配置weblogic8.1啊?
- 求助!在调取对方提供的url时报错,无法获得返回报文,但是在主机上传报文文档给这地址却能获得返回报文,帮帮忙!
- JSP实现跨浏览器的打印预览
- ie6问题 ie6取不到数组值
xmlHttp.send(null);
xmlHttp.onreadystatechange=checkStuNoCallback; //加上
}
function checkStuNoCallback(){
alert(“11”);
if(xmlHttp.readyState == 4){
alert(xmlHttp.status);
if(xmlHttp.status == 200){
var text = xmlHttp.responseText;
但是你要检查一下你的项目路径,前面有没有项目名称.如果有项目名称,那你得在你的Action路径上写全.
全路径的方式可以:
EL表达式
${pageContext.request.contextPath},
OGNL的话可以
<s:url value="/baidu/StuNoCheck.action"/> 这样来试试
改为
xmlHttp.open("post","${pageContext.request.contextPath}/baidu/StuNoCheck.action?stuNo=" + stuNo,true);
或者
xmlHttp.open("post","baidu/StuNoCheck.action?stuNo=" + stuNo,true);
如果是全路径的话 就看8楼说的
xmlHttp.send(null);
xmlHttp.onreadystatechange=checkStuNoCallback; //加上
}
There is no Action mapped for action name StuNoCheck. - [unknown location]
但是xmlHttp.open("post","baidu/StuNoCheck.action?stuNo=" + stuNo,true);这种方法就不行