Chapter 4. Handling the Client Request: Form Data

Topics in This Chapter

  • Reading individual request parameters

  • Reading the entire set of request parameters

  • Handling missing and malformed data

  • Filtering special characters out of the request parameters

  • Automatically filling in a data object with request parameter values

  • Dealing with incomplete form submissions

One of the main motivations for building Web pages dynamically is so that the result can be based upon user input. This chapter shows you how to access that input (Sections 4.14.4). It also shows you how to use default values when some of the expected parameters are missing (Section 4.5), how to filter < and > out of the request data to avoid messing up the HTML results (Section 4.6), how to create ...

Get Core Servlets and JavaServer Pages™: Volume 1: Core Technologies, 2nd Edition 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.