Java Reference
In-Depth Information
That's all it takes to change every JSP's state field.
13.
Run InsEmpInfo on the server.
14.
Click on the state drop-down menu and verify that the value IN appears as an option.
15.
Enter the information as seen in Figure 11-14 and click the Insert button.
Figure 11-14.
The InsEmpInfo page will be redisplayed and all the data removed from the fields. But, did it work? Well, if you
can access the database directly, display the Employee table and verify that the record was inserted. However, to
prove that the insert worked, we will modify the get-Emp tag (i.e., CrtEmpBean.java) so that database information will
be displayed.
Tutorial: Modifying the Tag Handler
CrtEmpBean will be modified to check the database when an employee number is entered on EnterEmpInfoJSP.
If there is employee information in the database, then any information that came from the form (i.e., that is in
EmpBean) will be overwritten with the database information. As before, the display page will then display the
EmpBean data. We will also modify the display page to include the gross salary and tax amounts for the employee and
provide the option to delete the employee information from the database.
 
Search WWH ::




Custom Search