Exercise

Refactor the register.jsp page you developed on Day 13 to use custom tags. Write a getApplicant tag that provides support for accessing the Applicant Session bean and remove the need for the web.ApplicantBean class. Model your code on the changes to the advertise.jsp page and the new getCust tag you were shown in today's work. As a starting point for the code for your exercise, use the agency code from today's examples sub-directory of the case study on the accompanying CD-ROM. The existing agency.jsp page includes the code for creating a new applicant and for selecting an existing applicant for update or deletion.

You will need to create the following JSP files to support the register applicant functionality:

  • register.jsp

  • createApplicant.jsp

  • deleteApplicant.jsp

  • updateApplicant.jsp

You can use the versions of these files from Day 13 and modify them to use the tag libraries you developed today for handling locations and skills. In addition, you will need to develop a new custom tag to create an instance of a Register Session bean for use on the Web page. Call the new Tag Library class GetAppTag.java.

Model your implementation and use of this tag following the example GetCustTag shown in this chapter.

Don't forget to add an entry for the GetApp tag to the agency.tld file.

A solution to this exercise is incorporated in the Agency case study stored in the agency sub-directory of Day 14 on the accompanying CD-ROM.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.218