Testing the JSP Page

To test the login page and the filtering of employees, do the following:

  1. In the Application Navigator, right-click the view project, and select Run.

    You may be prompted to specify a Default Run Target for the project. For now, set this to login.jsp. You can later change the project properties for the default run target page to be any page of your choice.

    The login page is displayed in your browser, as shown in Figure 4-18.

    Figure 4-18 Login Page for Sample Application in the Browser

    Description of Figure 4-18 follows
    Description of "Figure 4-18 Login Page for Sample Application in the Browser"
  2. Enter the following login details for your database, and then click Submit.

    User ID: HR

    Password: hr

    Host: localhost

    The Employee.java file is displayed in your browser as shown in Figure 4-19.

    Figure 4-19 Unfiltered Employee Data in employee.jsp

    Description of Figure 4-19 follows
    Description of "Figure 4-19 Unfiltered Employee Data in employee.jsp"
  3. Enter a string of letters by which you want to filter employee data. For example, enter ing in the Filter by Employee Name field, and click Filter. A filtered list is displayed, which is shown in:

    Figure 4-20 Filtered Employee Data in employee.jsp

    Description of Figure 4-20 follows
    Description of "Figure 4-20 Filtered Employee Data in employee.jsp"