- 爱易网页
-
Java教程
- jsp跳转路径异常,找不到页面,直接没有进入servlet的方法
日期:2014-05-18 浏览次数:20752 次
jsp跳转路径错误,找不到页面,直接没有进入servlet的方法
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>order.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script language="javascript">
function RegisterSubmit(){
with(document.order){
var user=username.value;
var cart=creditcard.value;
if(user==null || user==""){
alert("请填写用户名");
}else if(cart==null || cart==""){
alert("请填写信用卡号码");
}else{
document.order.submit();
}
}
}
</script>
</head>
<body>
<form action="ProcessOrder" method="post" name="order">
<table style="text-align: center" width="590" border="0">
<th>
请输入以下信息:
</th>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td>
用户名:
</td>
<td>
<div align="left">
<input type="text" name="username" size="20" />
</div>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td>
邮编:
</td>
<td>
<div align="left">
<input type="text" name="zipcode" size="20" />
</div>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td>
电话:
</td>
<td>
<div align="left">
<input type="text" name="phone" size="20" />
</div>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td>
信用卡:
</td>
<td>
<div align="left">
<input type="text" name="creditcard" size="20" />
</div>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td>
<input type="button" value="提交" onclick="RegisterSubmit()"/>
</td>
<td align="left">
<input type="reset" value="重置" />
</td>
</tr>
</table>
</form>
</body>
</html>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">