由于项目是分模块做的,现在有个在线考试的功能在工程的exam文件中。即在webroot里面,
web-inf里的struts-config.xml配置如下<!-- 考生 -->
<action name="studentForm" path="/exam/manage/student" scope="request" type="com.wgh.action.Student" validate="true">
<forward name="studentLoginok" path="/exam/default.jsp" />
<forward name="studentQuery" path="/exam/manage/student.jsp" />
<forward name="studentAdd" path="/exam/student_ok.jsp" />
<forward name="modifyQuery" path="/exam/student_Modify.jsp" />
<forward name="studentModify" path="/exam/studentM_ok.jsp" />
<forward name="studentDel" path="/exam/manage/student_ok.jsp?para=3" />
<forward name="seekPwd1" path="/exam/seekPwd1.jsp"/>
<forward name="seekPwd2" path="/exam/seekPwd2.jsp"/>
<forward name="error" path="/exam/manage/error.jsp" />
</action>现在当超连接到exam文件下的index.jsp就报Cannot retrieve mapping for action 错
index.jsp代码如下:<%@ page contentType="text/html; charset=gb2312" language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<head>
<title>网络在线考试</title>
<link href="CSS/style.css" rel="stylesheet">
<script language="javascript">
function check(form){
if (form.name.value==""){
alert("请输入准考证号!");form.name.focus();return false;
}
if (form.pwd.value==""){
alert("请输入密码!");form.pwd.focus();return false;
}
}
</script>
</head>
<body>
<table width="778" height="266" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/login_top.jpg">
<tr>
<td width="118" colspan="2"> </td>
</tr>
</table>
<table width="778" height="158" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/login_mid.jpg">
<html:form action="manage/student.do?action=login" method="post" focus="ID" onsubmit="return check(studentForm)">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolorlight="#FFFFFF" bordercolordark="#D2E3E6">
<tr>
<td> </td>
<td></td>
<td></td>
</tr>
<tr>
<td width="35%" height="30"> </td>
<td width="9%" height="30">准考证号:</td>
<td width="27%">
<html:text property="ID" styleClass="logininput" size="25"/> </td>
<td width="29%"> </td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">密 码:</td>
<td><html:password property="pwd" styleClass="logininput" size="25"/></td>
<td> </td>
</tr>
<tr>
<td height="31"> </td>
<td height="31" colspan="2" align="left"><html:submit styleClass="btn_grey" value="登录"/>
<html:reset value="重置" styleClass="btn_grey"/>
<html:button property="button" styleClass="btn_grey" value="注册" onclick="window.location.href='register.jsp'"/>
<html:button property="button" styleClass="btn_grey" value="找回密码" onclick="window.location.href='seekPwd.jsp'"/></td>
<td> </td>
</tr>
<tr>
<td height="40"> </td>
<td height="31" colspan="2" align="right" valign="bottom"><html:link page="manage/login.jsp" styleClass="word_orange">老师登录入口</html:link></td>
<td> </td>
</tr>
</table>
</td>
</tr>
</html:form>
</table>
<table width="778" height="196" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/login_top.gif">
<tr>
<td height="182" background="Images/login_bottom.jpg"> </td>
</tr>
</table>
</body>
</html>
急求!在线等
web-inf里的struts-config.xml配置如下<!-- 考生 -->
<action name="studentForm" path="/exam/manage/student" scope="request" type="com.wgh.action.Student" validate="true">
<forward name="studentLoginok" path="/exam/default.jsp" />
<forward name="studentQuery" path="/exam/manage/student.jsp" />
<forward name="studentAdd" path="/exam/student_ok.jsp" />
<forward name="modifyQuery" path="/exam/student_Modify.jsp" />
<forward name="studentModify" path="/exam/studentM_ok.jsp" />
<forward name="studentDel" path="/exam/manage/student_ok.jsp?para=3" />
<forward name="seekPwd1" path="/exam/seekPwd1.jsp"/>
<forward name="seekPwd2" path="/exam/seekPwd2.jsp"/>
<forward name="error" path="/exam/manage/error.jsp" />
</action>现在当超连接到exam文件下的index.jsp就报Cannot retrieve mapping for action 错
index.jsp代码如下:<%@ page contentType="text/html; charset=gb2312" language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<head>
<title>网络在线考试</title>
<link href="CSS/style.css" rel="stylesheet">
<script language="javascript">
function check(form){
if (form.name.value==""){
alert("请输入准考证号!");form.name.focus();return false;
}
if (form.pwd.value==""){
alert("请输入密码!");form.pwd.focus();return false;
}
}
</script>
</head>
<body>
<table width="778" height="266" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/login_top.jpg">
<tr>
<td width="118" colspan="2"> </td>
</tr>
</table>
<table width="778" height="158" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/login_mid.jpg">
<html:form action="manage/student.do?action=login" method="post" focus="ID" onsubmit="return check(studentForm)">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolorlight="#FFFFFF" bordercolordark="#D2E3E6">
<tr>
<td> </td>
<td></td>
<td></td>
</tr>
<tr>
<td width="35%" height="30"> </td>
<td width="9%" height="30">准考证号:</td>
<td width="27%">
<html:text property="ID" styleClass="logininput" size="25"/> </td>
<td width="29%"> </td>
</tr>
<tr>
<td height="30"> </td>
<td height="30">密 码:</td>
<td><html:password property="pwd" styleClass="logininput" size="25"/></td>
<td> </td>
</tr>
<tr>
<td height="31"> </td>
<td height="31" colspan="2" align="left"><html:submit styleClass="btn_grey" value="登录"/>
<html:reset value="重置" styleClass="btn_grey"/>
<html:button property="button" styleClass="btn_grey" value="注册" onclick="window.location.href='register.jsp'"/>
<html:button property="button" styleClass="btn_grey" value="找回密码" onclick="window.location.href='seekPwd.jsp'"/></td>
<td> </td>
</tr>
<tr>
<td height="40"> </td>
<td height="31" colspan="2" align="right" valign="bottom"><html:link page="manage/login.jsp" styleClass="word_orange">老师登录入口</html:link></td>
<td> </td>
</tr>
</table>
</td>
</tr>
</html:form>
</table>
<table width="778" height="196" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/login_top.gif">
<tr>
<td height="182" background="Images/login_bottom.jpg"> </td>
</tr>
</table>
</body>
</html>
急求!在线等
解决方案 »
- hibernate的id生成策略问题
- Restrictions.between中的日期查询,效率很低?
- jsp加载写好的class报错,看看我哪个地方做的有问题?
- jsp转asp,在线等急,谢谢啊
- select菜单隐藏问题
- proxool连oracle长时间没用,会Io 异常: Connection reset oracle
- struts action执行的东西太多,返回页面超时
- 如何能用js实现在新窗口打开页面 并且是模态的
- tomcat 5.5在 ms2000下怎么重新设置web应用程序目录
- 关于获取请求的url对应的类的名字的问题。
- 帮解释一下这些配置。。。。。。。。。。。。。。。。。。。。。。
- 求教一个线程的问题
<forward name="studentLoginok" path="/exam/default.jsp" />
<forward name="studentQuery" path="/exam/manage/student.jsp" />
<forward name="studentAdd" path="/exam/student_ok.jsp" />
<forward name="modifyQuery" path="/exam/student_Modify.jsp" />
<forward name="studentModify" path="/exam/studentM_ok.jsp" />
<forward name="studentDel" path="/exam/manage/student_ok.jsp?para=3" />
<forward name="seekPwd1" path="/exam/seekPwd1.jsp"/>
<forward name="seekPwd2" path="/exam/seekPwd2.jsp"/>
<forward name="error" path="/exam/manage/error.jsp" />
</action>这里我并没有看见你的配置中有index.jsp啊 肯定是回报错的