index.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="show.jsp" method="post">
用户名:<input type="text" name="name"><br>
密码:<input type="password" name="pass"><br>
密码找回问题:<input type="text" name="question">
<br>
问题答案:<input type="text" name="answer">
<br>
<input type="submit">
</form>
</body>
</html>
show.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>
<jsp:useBean id="aUser" class="register.user"></jsp:useBean>
<jsp:setProperty property="*" name="aUser"/>
请您核对信息如下:<br>
用户名:<jsp:getProperty property="name" name="aUser"/>
密码:<jsp:getProperty property="pass" name="aUser"/>
密码找回问题:<jsp:getProperty property="question" name="aUser"/>
答案:<jsp:getProperty property="answer" name="aUser"/>
</body>
</html>