login.jsp页面用于输入登陆信息:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="loginsuccess.jsp" method="post">
<table border="1">
<tr>
<td>用户名:<input type="text" name="username">
</td>
</tr>
<tr>
<td>密 码:<input type="password" name="password">
</tr>
<tr>
<td><input type="submit" value="登陆"><input type="reset" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
loginsuccess.jsp用于接受并显示参数:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
你的用户名是:${param.username } <br/>
你的密码是:${param.password }
</body>
</html>
也欢迎登录我的个人网站,里面有更多的文章及技术咨询在等你:http://www.guangmuhua.com