;
<br><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
<br>
Value of Bean property is :<jsp:getProperty name="jsp3BeanId" property="sample" />
</form>
</body>
</html>
-----------------------------------------------------------------------------------------------
jsp4:
<%@ page contentType="text/html; charset=GB2312" %>
<html>
<head>
<title>
登录
</title>
</head>
<body bgcolor="#ffffc0">
<form method="POST" action="jsp6.jsp">
<p align="center">
用户名:<input type="text" name="username" size="20"></p>
<p align="center">
密 码:<input type="password" name="password" size="20"></p>
<p align="center">
<input type="radio" value="manage" checked name="select">
管理
<input type="radio" name="select" value="statistic">统计</p>
<p align="center"><input type="submit" value="登 录" name="login">
<input type="reset" value="重 写" name="reset"></p>
</form>
</body>
</html>
----------------------------------------------------------------------------------------------------------
jsp6:
<%@ page contentType="text/html; charset=GB2312" %>
<html>
<head>
<title>
接收数据
</title>
</head>
<body bgcolor="#ffffff">
<%
String user,pwd,choice;
user=request.getParameter("username");
pwd=request.getParameter("password");
choice=request.getParameter("select");
if(choice.equals("manage")){
//user select manage.
%>
<jsp:forward page="jsp7.jsp">
<jsp:param name="username" value="<%=user%>"/>
<jsp:param name="password" value="<%=pwd%>"/>
</jsp:forward>
<%
}else{
//user select statistic
%>
<jsp:forward page="jsp8.jsp">
<jsp:param name="username" value="<%=user%>"/>
<jsp:param name="password" value="<%=pwd%>"/>
</jsp:forward>
<%
}
%>
</body>
</html>
-----------------------------------------------------------------------------------------------
jsp7:
<%@ page contentType="text/html; charset=GB2312" %>
<html>
<head>
<title>
jsp7
</title>
</head>
<body bgcolor="#ffffff">
<h1>
这是管理页 !!!
</h1>
<br>
<%
String user,pwd;
user=request.getParameter("username");
pwd=request.getParameter("password");
%>
username is: <%=user%><br>
password is: <%=pwd%><br>
</body>
</html>
---------------------------------------------------------------------------------------------
jsp8:
<%@ page contentType="text/html; charset=GB2312" %>
<html>
<head>
<title>
jsp8
</title>
</head>
<body bgcolor="#ffffff">
<h1>
这是统计页 !!!
</h1>
<br>
<%
St