O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required