Using HTTP Request Parameters

The next requirement for many JSP pages is to be able to use request parameters to configure the behavior of the page. Using the Agency case study as an example, you will develop a simple JSP to display the contents of a named database table.

The first step is to define a simple form to allow the user to select the table to display. Listing 13.7 shows a simple form encoded as a JSP.

Listing 13.7. Full Text of tableForm.jsp
 1: <HTML> 2: <TITLE>Agency Tables</TITLE> 3: <BODY> 4: <FORM action=table> 5: Select a table to display: 6: <SELECT name=table> 7: <OPTION>Applicant 8: <OPTION>ApplicantSkill 9: <OPTION>Customer 10: <OPTION>Job 11: <OPTION>JobSKill 12: <OPTION>Location 13: <OPTION>Matched 14: <OPTION>Skill 15: ...

Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.