The main application is that there are too many registration information and multiple pages are used for step-by-step registration. The general principle is that an actionform corresponds to multiple actions.
1. Create an actionform with three fields: name, password, and email. You do not need to add a jsp tutorial.
2. Create a jsp named register1.jsp. The code is as follows:
View source
Print?
| 1 |
<Html: form Action="/Register1.do" Method="Post"> |
| 2 |
Username: <Html: text Property="Username"/> |
| 3 |
<Html: errors Property="Username" /> |
| 4 |
Password: <Html: text Property="Password"/> |
| 5 |
<Html: errors Property="Password" /> |
| 6 |
<Input Type="Hidden" Name="Page" Value="1"/> |
3. Create another jsp named register2.jsp. The code is as follows:
<Html: form action = "/register1.do" method = "post">
Username:<Html: text property = "username"/>
<Html: errors property = "username"/>
Password:<Html: text property = "password"/>
<Html: errors property = "password"/>
<Input type = "hidden" name = "page" value = "1"/>
<Html: submit/>
4. Create two actions:/register1 and/register2, as shown in the following figure.