<%@ 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>Message Html</title>
</head>
<body>
欢迎您!
<form action="" method="post">
<table>
<tr>
<td>
学生姓名:
<input type='text' name='student_name'></input>
学生成绩:
<input type='text' name='score'></input>
<input type='submit' value='提交' />
</td>
</tr>
<tr>
<td>
<p>
提交后的值:
</p>
学生姓名:<%=request.getParameter("student_name")%><br>
学生成绩:<%=request.getParameter("score")%><br>
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=GB2312"
pageEncoding="GB2312"%>
<!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=GB2312">
<title>Insert title here</title>
</head>
<body>
<form action="" method="post">
<td>
用户名:
<input type="text" name="username">
密码:
<input type="password" name="userpass">
<input type="submit" value="提交">
</td>
<td>
<p>
下面是界面接受到得数据显示在界面:
</p>
用户名显示的结果为:<%=request.getParameter("username")%>
<br>
密码显示的结果为:<%=request.getParameter("userpass")%>
</td>
</form>
</body>
</html>