- 分享
- 0
- 人气
- 0
- 主题
- 14
- 帖子
- 617
- UID
- 227559
- 积分
- 4976
- 阅读权限
- 22
- 注册时间
- 2009-5-16
- 最后登录
- 2021-4-14
- 在线时间
- 5701 小时
|
小弟新手 刚学JSP 问题多多
这是我的部分的JSP- <body>
- <img src="../image/user_student.png" cellspacing="0" cellpadding="0" valign="bottom"></img><span class="titletext"> Student Control Page Login</span>
- <hr />
- </br>
- <form enctype="multipart/form-data" method="POST" onSubmit="return submitForm();" name=frm>
- <label>Student ID :</label> <br/>
- <input name="stuID" id="stuID" type="text" autofocus/><br><br/>
-
- <label>Password :</label> <br/>
- <input name="stuPW" id="stuPW" type="password"/><br><br/>
-
- <div class="password"><a href="forgotPasswordMain.jsp">Forgot your password?</a></div></br>
- <input class="" type="submit" value="Submit" name="Submit" id="submit" onclick="doSubmit()" />
-
- <INPUT type=hidden name="hdLogin" value=""/>
- </form>
- </body>
复制代码 我是用 Javascript 来 call Servlet- function doSubmit(){
- var f = document.frm;
- f.hdLogin.value = f.stuID.value+";"+f.stuPW.value;
- f.method = "POST";
- f.target = "_self";
- f.action = "servLogin";
- f.submit();
- }
- </script>
复制代码 Servlet的 class file 就放在跟JSP同一个directory
用尽了很多方法还是解决的不了
当我按submit :
HTTP Status 404 - /StuAttMgmtSys/main/servLogin
type Status report
message /StuAttMgmtSys/main/servLogin
description The requested resource (/StuAttMgmtSys/main/servLogin) is not available.
Apache Tomcat/7.0.14
到底是什么出了问题 帮帮忙 谢谢 |
|