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 "form beans" that can be automatically populated from the request data (Section 4.7), and how, when required request parameters are missing, to redisplay the form with the missing values highlighted (Section 4.8).



Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net