You are previewing Beginning JavaServer Pages™.
O'Reilly logo
Beginning JavaServer Pages™

Book Description

  • JSP is one of the core technologies for server-side Java applications and the 2.0 release, which this book covers in detail, makes JSP an even more powerful tool

  • Walks Java programmers and Web developers through JSP fundamentals, including JSP syntax and directives, JSP Expression Language, JSP Tag libraries, JSTL, and techniques for testing and debugging

  • Shows how to use JSP in real-world Web applications along with open source frameworks such as Struts, WebWork, and Turbine, software design methodologies, and developer tools like Ant, jUnit, and CVS, as well as popular IDEs (integrated development environmnents)

  • Each chapter has an exercise section with solutions on the companion Web site

Table of Contents

  1. Copyright
  2. About the Authors
  3. Credits
  4. Acknowledgments
  5. Introduction
    1. The Right Way to Do Web Development
    2. Approach
    3. How This Book Is Structured
    4. Conventions
        1. How It Works
    5. Source Code
    6. Errata
    7. p2p.wrox.com
  6. I. JSP Fundamentals
    1. 1. Getting Started with JavaServer Pages
      1. 1.1. Creating Applications for the Internet
        1. 1.1.1. Limitations of the basic Web server model
        2. 1.1.2. Dynamic HTML generation via CGI
        3. 1.1.3. Shortcomings of CGI
        4. 1.1.4. Improving Java-based CGI: servlets
          1. 1.1.4.1. Web server configurations: integrating servlet containers
          2. 1.1.4.2. Optimizing servlet development: JavaServer Pages
            1. 1.1.4.2.1. Checking your system for Java
            2. 1.1.4.2.2. Downloading Tomcat
            3. 1.1.4.2.3. Installing Tomcat
            4. 1.1.4.2.4. Adding an administrative user and password on a Linux system
            5. 1.1.4.2.5. Starting and shutting down Tomcat 5
            6. 1.1.4.2.6. Verifying your Tomcat 5 installation
          3. 1.1.4.3. How It Works
          4. 1.1.4.4. How It Works
            1. 1.1.4.4.1. Tags and taglib
            2. 1.1.4.4.2. JSP's rapid development cycle
            3. 1.1.4.4.3. Authentication for Manager access
          5. 1.1.4.5. How It Works
      2. 1.2. Summary
      3. 1.3. Exercises
    2. 2. JSP Basics 1: Dynamic Page Creation for Data Presentation
      1. 2.1. The Anatomy of a JSP Page
        1. 2.1.1. Directives
        2. 2.1.2. XML-compatible syntax
        3. 2.1.3. Template data
        4. 2.1.4. Action
        5. 2.1.5. Scripting elements
        6. 2.1.6. Handling HTML form submission with JSP
          1. 2.1.6.1. GET versus POST
          2. 2.1.6.2. How It Works
            1. 2.1.6.2.1. Using the GET method to submit a form
            2. 2.1.6.2.2. Working with JSTL 1.1
            3. 2.1.6.2.3. Working with the JSP 2.0 Expression Language (EL)
            4. 2.1.6.2.4. EL implicit objects
          3. 2.1.6.3. How It Works
            1. 2.1.6.3.1. JSP best practices
            2. 2.1.6.3.2. Using the <jsp:include> standard action to select portal rendering
            3. 2.1.6.3.3. Manipulating JavaBeans with JSP standard actions
            4. 2.1.6.3.4. Rendering a multivalued JavaBean property with JSTL/EL
        7. 2.1.7. Web site personalization
          1. 2.1.7.1.
            1. 2.1.7.1.1. Observing HTTP GET method URL encoding
            2. 2.1.7.1.2. Vulnerability of the HTTP GET method of form submission
          2. 2.1.7.2. How It Works
            1. 2.1.7.2.1. Passing parameters to included JSPs
            2. 2.1.7.2.2. Modifying the included JSP to use personalization data
      2. 2.2. Summary
      3. 2.3. Exercises
    3. 3. JSP Basics 2: Generalized Templating and Server Scripting
      1. 3.1. Scripting Elements for Java Code Embedding
        1. 3.1.1. Scripting elements
          1. 3.1.1.1. Declaration scripting elements
            1. 3.1.1.1.1. Working with jspInit() and jspDestroy()
          2. 3.1.1.2. Expression scripting element
          3. 3.1.1.3. Scriptlet scripting element
          4. 3.1.1.4. Java class syntax and scripting elements layout
      2. 3.2. Creating a Simple Web Storefront
        1. 3.2.1.
          1. 3.2.1.1. How It Works
        2. 3.2.2. Attaching attributes to implicit objects
        3. 3.2.3. Rendering the list of categories
        4. 3.2.4. Rendering the list of products in a given category
      3. 3.3. Adding a Shopping Cart to a Catalog
        1. 3.3.1.
          1. 3.3.1.1. How It Works
      4. 3.4. Creating the Shopping Cart
        1. 3.4.1. Decoding incoming request parameters
        2. 3.4.2. Rendering order information
        3. 3.4.3. Rendering the Return to Shopping hyperlink
        4. 3.4.4. Shopping cart limitations
        5. 3.4.5. Overcoming the shopping cart limitations
          1. 3.4.5.1. How It Works
        6. 3.4.6. Sessions and JSPs
          1. 3.4.6.1. Session implementation
          2. 3.4.6.2. Using a session to track line items in a shopping cart
        7. 3.4.7. Rendering the shopping cart using a session attribute
          1. 3.4.7.1. Rendering the total order price and the Clear the Cart hyperlink
          2. 3.4.7.2. Scoping of implicit objects in JSP
      5. 3.5. Summary
      6. 3.6. Exercises
    4. 4. CSS, JavaScript, VBScript, and JSP
      1. 4.1. Code Elements That Execute on the Client Side
        1. 4.1.1. Cascading Stylesheets
        2. 4.1.2. JavaScript
        3. 4.1.3. VBScript
      2. 4.2. User Preference Implementation
        1. 4.2.1.
          1. 4.2.1.1. How It Works
          2. 4.2.1.2. Adding user preference form fields
          3. 4.2.1.3. Dynamic generation of CSS stylesheet content
          4. 4.2.1.4. Decoding form parameters and setting style variables
      3. 4.3. Creating a User-Customizable DHTML Menu
        1. 4.3.1.
          1. 4.3.1.1. How It Works
          2. 4.3.1.2. Customizing the DHTML menu with user color and font preferences
          3. 4.3.1.3. Generating JavaScript code with JSP for the DHTML menu
      4. 4.4. Summary
      5. 4.5. Exercises
    5. 5. JSP and EL
      1. 5.1. EL and Its Vital Role in JSP
      2. 5.2. EL Named Variables
      3. 5.3. Applying EL
        1. 5.3.1. Using EL expressions inline with template data
        2. 5.3.2. Using EL expressions in attribute values
          1. 5.3.2.1. How It Works
            1. 5.3.2.1.1. Operators
            2. 5.3.2.1.2. Arithmetic operators
            3. 5.3.2.1.3. Logical operators
            4. 5.3.2.1.4. Comparison operators
            5. 5.3.2.1.5. The empty operator
            6. 5.3.2.1.6. Boolean variables and nulls
      4. 5.4. Coercion: Automatic Type Conversion
        1. 5.4.1. Boxing and unboxing
        2. 5.4.2. Coercion to a string
        3. 5.4.3. Coercion to a number
        4. 5.4.4. Coercion to a character
        5. 5.4.5. Best attempt to "do the right thing" without error
          1. 5.4.5.1. How It Works
      5. 5.5. Accessing Object Properties and Collections
        1. 5.5.1.
          1. 5.5.1.1. How It Works
      6. 5.6. Implicit EL Objects in JSP 2.0
        1. 5.6.1.
          1. 5.6.1.1. How It Works
      7. 5.7. User-Supplied Functions within EL
        1. 5.7.1. Namespace and EL functions
        2. 5.7.2. Static methods of a Java class
          1. 5.7.2.1. How It Works
            1. 5.7.2.1.1. Deployment descriptor entries
            2. 5.7.2.1.2. TLD function definitions
      8. 5.8. Summary
      9. 5.9. Exercises
    6. 6. JSP Tag Libraries and JSTL
      1. 6.1. The Vital Role of JSP Tag Libraries
      2. 6.2. The JSP Standard Tag Library
      3. 6.3. Anatomy of a Tag Library
        1. 6.3.1. The Tag Library Descriptor
        2. 6.3.2. The taglib map in the web.xml deployment descriptor
        3. 6.3.3. Locating JSTL and understanding tag library packaging
        4. 6.3.4. JSTL tags
          1. 6.3.4.1. Core tags
          2. 6.3.4.2. Formatting tags
          3. 6.3.4.3. XML tags and SQL tags
          4. 6.3.4.4. How It Works
            1. 6.3.4.4.1. Eliminating scripting declarations
            2. 6.3.4.4.2. Declaring taglib usage
            3. 6.3.4.4.3. Converting static method calls to EL accessible functions
            4. 6.3.4.4.4. Replacing scripting iteration with the JSTL iteration tag
            5. 6.3.4.4.5. JSTL's versatile URL creation tag
          5. 6.3.4.5. How It Works
            1. 6.3.4.5.1. Declaring constants with <c:set>
            2. 6.3.4.5.2. Replacing complex Java scripting logic
            3. 6.3.4.5.3. Converting control flow
            4. 6.3.4.5.4. Converting method calls
            5. 6.3.4.5.5. Changing the lineitems table layout
            6. 6.3.4.5.6. A Common JSTL coding errors
      4. 6.4. Summary
      5. 6.5. Exercises
    7. 7. JSP Directives
      1. 7.1. Directive Basics
        1. 7.1.1. Directives as instructions for the container
        2. 7.1.2. Alternative XML syntax for directives
        3. 7.1.3. Available JSP directives
          1. 7.1.3.1. Processing a JSP page: the container's perspective
      2. 7.2. The page Directive
        1. 7.2.1. The language attribute
        2. 7.2.2. The extends attribute
        3. 7.2.3. The import attribute
        4. 7.2.4. The session attribute
        5. 7.2.5. The info attribute
        6. 7.2.6. The isELIgnored attribute
        7. 7.2.7. The isErrorPage attribute
        8. 7.2.8. The errorPage attribute
        9. 7.2.9. The contentType attribute
          1. 7.2.9.1. How It Works
            1. 7.2.9.1.1. The effect of varying content type
      3. 7.3. The taglib Directive
        1. 7.3.1. Two general usage forms for the taglib directive
          1. 7.3.1.1. Using a URI to map to the tag library
          2. 7.3.1.2. Specifying the directory of the tag files directly
        2. 7.3.2. Attributes of the taglib directive
          1. 7.3.2.1. How It Works
            1. 7.3.2.1.1. A JSP using tags without the taglib directive!
            2. 7.3.2.1.2. The <include-prelude> and <include-coda> elements
      4. 7.4. The include Directive
        1. 7.4.1. The include performed at translation time
          1. 7.4.1.1. How It Works
            1. 7.4.1.1.1. How the include directive and the <jsp:include> standard action differ
            2. 7.4.1.1.2. Translation-time detection of errors versus request-time detection of errors
          2. 7.4.1.2. Converting the index.jsp file into XML form
            1. 7.4.1.2.1. Converting directives to XML syntax
      5. 7.5. Summary
      6. 7.6. Exercises
    8. 8. JSP Standard Actions
      1. 8.1. JSP Standard Actions Are Built-in Tags
      2. 8.2. Actions for Working with JavaBeans
        1. 8.2.1. The <jsp:useBean> standard action
          1. 8.2.1.1. Using the <jsp:useBean> standard action
          2. 8.2.1.2. How It Works
            1. 8.2.1.2.1. Searching for a scoped named attribute
            2. 8.2.1.2.2. Container-generated Java source code
            3. 8.2.1.2.3. Synchronizing a Java reference with an attached attribute
            4. 8.2.1.2.4. Using a JavaBean in scripting elements
            5. 8.2.1.2.5. Using a JavaBean in an EL expression
            6. 8.2.1.2.6. Effect of the type attribute in <jsp:useBean>
          3. 8.2.1.3. The <jsp:setProperty> standard action
          4. 8.2.1.4. How It Works
            1. 8.2.1.4.1. Expediting form processing with <jsp:setProperty>
            2. 8.2.1.4.2. Using the "*" special value for the <jsp:setProperty> standard action
            3. 8.2.1.4.3. The <jsp:getProperty> standard action
            4. 8.2.1.4.4. Rendering property values using EL expressions
        2. 8.2.2. How <jsp:useBean> and JSTL <c:set> Differ
      3. 8.3. Including JSP Output via <jsp:include>
        1. 8.3.1.
          1. 8.3.1.1. How It Works
            1. 8.3.1.1.1. How the <%@ include %> directive and the <jsp:include> action differ
            2. 8.3.1.1.2. Effects of nested includes
            3. 8.3.1.1.3. Adding parameters to a <jsp:include> action
      4. 8.4. Transferring Control Between JSPs
        1. 8.4.1. The <jsp:forward> standard action
      5. 8.5. Specifying Parameters for Other Actions
        1. 8.5.1. The <jsp:param> standard action
      6. 8.6. Working with Plug-ins
        1. 8.6.1. The <jsp:plugin> standard action
        2. 8.6.2. The <jsp:params> standard action
        3. 8.6.3. The <jsp:fallback> standard action
          1. 8.6.3.1. How It Works
            1. 8.6.3.1.1. Generating parameters for the applet
            2. 8.6.3.1.2. Handling user color selection
            3. 8.6.3.1.3. Processing the color parameter
            4. 8.6.3.1.4. Rendering alternative output for browsers without applet support
            5. 8.6.3.1.5. HTML generated by <jsp:plugin>
            6. 8.6.3.1.6. Practical real-world use of <jsp:plugin>
      7. 8.7. Standard Actions Specific to Tag Files
      8. 8.8. Summary
      9. 8.9. Exercises
    9. 9. JSP and JavaBeans
      1. 9.1. Anatomy of a JavaBean
        1. 9.1.1. JavaBean Properties
          1. 9.1.1.1. Coding JavaBean properties
        2. 9.1.2. JavaBean methods
          1. 9.1.2.1. Invoking JavaBean methods using scriptlets
          2. 9.1.2.2. Scriptless JSP and EL functions
        3. 9.1.3. Common JavaBean packaging
          1. 9.1.3.1. How It Works
            1. 9.1.3.1.1. Switching requests through a front controller
            2. 9.1.3.1.2. The index.jsp front controller
            3. 9.1.3.1.3. Forwarding to different targets
            4. 9.1.3.1.4. JavaBean flow for validation error reporting
            5. 9.1.3.1.5. Accessing JavaBeans using standard actions
            6. 9.1.3.1.6. The validation error information JavaBean
            7. 9.1.3.1.7. The enterbid.jsp target
            8. 9.1.3.1.8. Displaying bid information via a JavaBean
            9. 9.1.3.1.9. Formatting auction output pages with a CSS stylesheet
          2. 9.1.3.2. How It Works
            1. 9.1.3.2.1. The Bidder JavaBean
            2. 9.1.3.2.2. Modifying the controller to fetch bidding results
      2. 9.2. How JavaBeans and EJBs Differ
      3. 9.3. Summary
      4. 9.4. Exercises
    10. 10. Error Handling
      1. 10.1. Understanding the Origin of Errors
        1. 10.1.1. Errors in Java language coding
        2. 10.1.2. Errors in scripting elements
          1. 10.1.2.1. How It Works
        3. 10.1.3. Errors in JSP directives and actions
          1. 10.1.3.1. How It Works
            1. 10.1.3.1.1. Errors in the <%@page %> directive
            2. 10.1.3.1.2. Errors in the <jsp:include> action
            3. 10.1.3.1.3. Translation-time errors versus request-time errors
            4. 10.1.3.1.4. Handling request-time errors in JSP
          2. 10.1.3.2. How It Works
          3. 10.1.3.3. How It Works
            1. 10.1.3.3.1. Java exceptions and JSP error handling
            2. 10.1.3.3.2. Accessing error information in an error-handling page
        4. 10.1.4. JSTL errors and EL errors
        5. 10.1.5. User data-input errors
        6. 10.1.6. Errors found in JSP template data
      2. 10.2. Summary
      3. 10.3. Exercises
    11. 11. Building Your Own Custom JSP Tag Library
      1. 11.1. What Is a Tag File?
      2. 11.2. A Simple Tag File: Displaying Today's Date
      3. 11.3. Advantages of Tag Files
        1. 11.3.1. Code reuse
        2. 11.3.2. Hiding complexity
        3. 11.3.3. Separation of concerns
        4. 11.3.4. Simplicity
        5. 11.3.5. Flexible packaging
      4. 11.4. Developing Tag Files
        1. 11.4.1. Scope and implicit objects
        2. 11.4.2. Using directives in tag files
          1. 11.4.2.1. tag
          2. 11.4.2.2. taglib
          3. 11.4.2.3. include
          4. 11.4.2.4. attribute
          5. 11.4.2.5. variable
            1. 11.4.2.5.1. Variable scope
        3. 11.4.3. Body processing
          1. 11.4.3.1. jsp:doBody
          2. 11.4.3.2. How It Works
        4. 11.4.4. Attributes
          1. 11.4.4.1. Simple attributes revisited
          2. 11.4.4.2. How It Works
          3. 11.4.4.3. Fragment attributes
          4. 11.4.4.4. How It Works
          5. 11.4.4.5. How It Works
          6. 11.4.4.6. Dynamic attributes
      5. 11.5. Packaging Tag Files
        1. 11.5.1.
          1. 11.5.1.1. How It Works
        2. 11.5.2. Java custom actions versus tag file custom actions
          1. 11.5.2.1. Complexity of the problem
          2. 11.5.2.2. Team skills and alien artifacts
      6. 11.6. Summary
      7. 11.7. Exercises
    12. 12. Advanced Dynamic Web Content Generation
      1. 12.1. Data Validation in Web Applications
        1. 12.1.1. Server-side validation and efficient usage of resources
        2. 12.1.2. Client-side data validation
        3. 12.1.3. The need for server-side validation
        4. 12.1.4. Common client-side validation scenarios
        5. 12.1.5. Operation of client-side validation
          1. 12.1.5.1. The client-side scripting language
          2. 12.1.5.2. How It Works
            1. 12.1.5.2.1. Using a front controller to forward requests
            2. 12.1.5.2.2. JavaScript for client-side validation
            3. 12.1.5.2.3. Using the hidden <span> tag to reveal multiple validation errors
            4. 12.1.5.2.4. Client-side validation prior to form submission
            5. 12.1.5.2.5. Displaying product data
        6. 12.1.6. Dynamic generation of client-side JavaScript code
          1. 12.1.6.1. How It Works
            1. 12.1.6.1.1. Using a custom tag library for client-side data validation
            2. 12.1.6.1.2. Tag library implementation details
        7. 12.1.7. Dynamic generation of XML using JSP
          1. 12.1.7.1. How It Works
            1. 12.1.7.1.1. Escaping reserved characters when generating XML
            2. 12.1.7.1.2. The <my:getInfo> custom tag
      2. 12.2. Summary
      3. 12.3. Exercises
    13. 13. Internationalization and Localized Content
      1. 13.1. About Internationalization-Ready Applications
      2. 13.2. Internationalization and Localization
        1. 13.2.1. The unique i18n requirements of a Web-based JSP application
      3. 13.3. Building on the Java Platform's i18n Capabilities
        1. 13.3.1. The concept of a locale
        2. 13.3.2. Maintaining locale information
          1. 13.3.2.1.
            1. 13.3.2.1.1. Working with the English localization
            2. 13.3.2.1.2. Working with the Chinese localization
          2. 13.3.2.2. How It Works
            1. 13.3.2.2.1. Explicit user selection of locale
            2. 13.3.2.2.2. Linking to the English form
            3. 13.3.2.2.3. Linking to the Chinese form
            4. 13.3.2.2.4. Handling i18n using duplicated sets of translated pages
            5. 13.3.2.2.5. The localized English pages
            6. 13.3.2.2.6. The localized Chinese pages
            7. 13.3.2.2.7. Trying out the English pages
            8. 13.3.2.2.8. Trying out the Chinese localization
          3. 13.3.2.3. How It Works
          4. 13.3.2.4. Java 2 resource bundles
          5. 13.3.2.5. Creating a resource bundle
          6. 13.3.2.6. How Java 2 selects i18n strings
          7. 13.3.2.7. Creating the Chinese l10n properties file
          8. 13.3.2.8. The Locale selection page
          9. 13.3.2.9. Generating a localized form using JSP
          10. 13.3.2.10. JSTL tags that support i18n
          11. 13.3.2.11. Applying the JSTL i18n tags
          12. 13.3.2.12. Creating an i18n-ready form processing JSP
          13. 13.3.2.13. Setting request parameter encoding
          14. 13.3.2.14. Determining a user's locale automatically (almost!)
          15. 13.3.2.15. How It Works
          16. 13.3.2.16. How It Works
      4. 13.4. Summary
      5. 13.5. Exercises
    14. 14. JSP Debugging Techniques
      1. 14.1. The Science of Debugging
        1. 14.1.1.
          1. 14.1.1.1. How It Works
      2. 14.2. Catching Bugs at Compile Time
        1. 14.2.1.
          1. 14.2.1.1. How It Works
          2. 14.2.1.2. How It Works
      3. 14.3. Using a Debugging System versus a Production System
      4. 14.4. Using System.out.println() to Instrument Code
        1. 14.4.1.
          1. 14.4.1.1. How It Works
      5. 14.5. Using a Logging System
        1. 14.5.1. Logging through the servlet container
          1. 14.5.1.1. How It Works
        2. 14.5.2. Logging with the JDK logger
          1. 14.5.2.1. How It Works
          2. 14.5.2.2. Using the LogManager class
          3. 14.5.2.3. Loggers and logging levels
          4. 14.5.2.4. Handlers
          5. 14.5.2.5. Configuring the SDK logging framework
          6. 14.5.2.6. How It Works
          7. 14.5.2.7. How It Works
        3. 14.5.3. Logging with Log4j
          1. 14.5.3.1. Appenders and Layouts
          2. 14.5.3.2. Configuring Log4j
          3. 14.5.3.3. How It Works
          4. 14.5.3.4. Changing the Log4j configuration without restarting the container
        4. 14.5.4. Logging with tag libraries
          1. 14.5.4.1. How It Works
      6. 14.6. Debugging with Tools
        1. 14.6.1. Setting breakpoints
        2. 14.6.2. Examining variables and setting watchpoints
        3. 14.6.3. Stepping through code
        4. 14.6.4. Remote debugging
      7. 14.7. Debugging Code in Production Environments
        1. 14.7.1. Debugging when the JSP is precompiled
        2. 14.7.2. Debugging under load
        3. 14.7.3. Adding contextual information to log files
        4. 14.7.4. Adding log filters
      8. 14.8. Finding the Intermittent Problem
        1. 14.8.1. Adding information as response comments
        2. 14.8.2. Snoop application
      9. 14.9. Avoiding Concurrency Issues
      10. 14.10. Summary
      11. 14.11. Exercises
  7. II. JSP and Modern Web Server Software Development
    1. 15. JSPs and Servlets
      1. 15.1. A JSP Is a Servlet
        1. 15.1.1.
          1. 15.1.1.1. How It Works
        2. 15.1.2. Anatomy of a servlet
          1. 15.1.2.1. The mark of a servlet: the javax.servlet.Servlet interface
          2. 15.1.2.2. Implementing the Servlet interface through the helper HttpServlet class
          3. 15.1.2.3. Overriding methods that you want to implement
          4. 15.1.2.4. Delegating processing to a common helper method
          5. 15.1.2.5. The init() and destroy() methods
        3. 15.1.3. The lifecycle of a servlet
        4. 15.1.4. Describing servlets to containers in the deployment descriptor
        5. 15.1.5. The servlet declaration
          1. 15.1.5.1. The servlet mapping
          2. 15.1.5.2. How It Works
        6. 15.1.6. Using servlets when JSP is available
        7. 15.1.7. Specifying initialization parameters
        8. 15.1.8. Accessing initialization parameters within the ControllerServlet
        9. 15.1.9. Custom forwarding of incoming requests via the controller servlet
        10. 15.1.10. The forwarding targets
      2. 15.2. Summary
      3. 15.3. Exercises
    2. 16. The Role of JSP in the Wider Context: Web Applications
      1. 16.1. What Is a Web Application?
      2. 16.2. Directory Structure for a Web Application
      3. 16.3. The Deployment Descriptor
        1. 16.3.1. Deployment descriptor elements for a JSP developer
          1. 16.3.1.1. Common JSP
            1. 16.3.1.1.1. context-param
            2. 16.3.1.1.2. welcome-file-list
            3. 16.3.1.1.3. error-page
          2. 16.3.1.2. Enterprise JSP
            1. 16.3.1.2.1. login-config
            2. 16.3.1.2.2. security-constraint
            3. 16.3.1.2.3. security-role
            4. 16.3.1.2.4. env-entry
            5. 16.3.1.2.5. resource-ref
            6. 16.3.1.2.6. servlet and servlet-mapping
      4. 16.4. Using a Web Archive
      5. 16.5. Development and Deployment Strategies
      6. 16.6. Packaging and Deploying for Tomcat
        1. 16.6.1.
          1. 16.6.1.1. How It Works
          2. 16.6.1.2. How It Works
        2. 16.6.2. Introduction to Web application security
          1. 16.6.2.1. How It Works
      7. 16.7. Summary
      8. 16.8. Exercises
    3. 17. Model View Controller
      1. 17.1. What Is MVC?
      2. 17.2. MVC and Web Applications
        1. 17.2.1.
          1. 17.2.1.1.
            1. 17.2.1.1.1. Controller: SimpleController
            2. 17.2.1.1.2. Model: Customer
            3. 17.2.1.1.3. View: displayList.jsp
            4. 17.2.1.1.4. Selecting a single customer for display
      3. 17.3. Summary
      4. 17.4. Exercise
    4. 18. Web Frameworks
      1. 18.1. What Is a Framework?
      2. 18.2. Why Frameworks Are Good
      3. 18.3. Types of Frameworks
        1. 18.3.1. Application frameworks
          1. 18.3.1.1. Architectural patterns
          2. 18.3.1.2. Validation mechanisms
          3. 18.3.1.3. Internationalization
          4. 18.3.1.4. Templating
        2. 18.3.2. Persistence frameworks
        3. 18.3.3. Utility frameworks
      4. 18.4. WebWork
        1. 18.4.1. Components of WebWork
          1. 18.4.1.1. Dispatchers
            1. 18.4.1.1.1. ServletDispatcher
            2. 18.4.1.1.2. GenericDispatcher
            3. 18.4.1.1.3. ClientDispatcher
          2. 18.4.1.2. Views
            1. 18.4.1.2.1. JSP
            2. 18.4.1.2.2. Velocity
            3. 18.4.1.2.3. XSLT
            4. 18.4.1.2.4. Jasper Reports
          3. 18.4.1.3. WebWork example
          4. 18.4.1.4. Installation
          5. 18.4.1.5. Example applications
          6. 18.4.1.6. Skeleton application
            1. 18.4.1.6.1. FormTest class
            2. 18.4.1.6.2. formtest.jsp
            3. 18.4.1.6.3. web.xml
            4. 18.4.1.6.4. webwork.properties
            5. 18.4.1.6.5. views.properties
            6. 18.4.1.6.6. Enhancements
      5. 18.5. The Spring Framework
        1. 18.5.1. Main components of the Spring MVC
          1. 18.5.1.1. Controllers and commands
          2. 18.5.1.2. Validators
          3. 18.5.1.3. Views
          4. 18.5.1.4. Internationalization
        2. 18.5.2. An example using Spring
          1. 18.5.2.1. Installation
          2. 18.5.2.2. Base application description
            1. 18.5.2.2.1. Controller: TestFormController
            2. 18.5.2.2.2. Model: TestForm
            3. 18.5.2.2.3. Validator: TestFormValidator
            4. 18.5.2.2.4. Resources: messages.properties
            5. 18.5.2.2.5. Views: form.jsp and success.jsp
            6. 18.5.2.2.6. Enhancements
          3. 18.5.2.3. How It Works
      6. 18.6. Summary
      7. 18.7. Exercises
    5. 19. Struts Framework
      1. 19.1. Introducing Struts
        1. 19.1.1. A Struts walkthrough
        2. 19.1.2. Controller: actions and forms
          1. 19.1.2.1. Actions
          2. 19.1.2.2. Forms
          3. 19.1.2.3. DynaActionForm
        3. 19.1.3. Model
        4. 19.1.4. View
          1. 19.1.4.1. Form bean interaction
          2. 19.1.4.2. Internationalization
          3. 19.1.4.3. Struts Tag Library
            1. 19.1.4.3.1. HTML form tags
            2. 19.1.4.3.2. Other HTML tags
            3. 19.1.4.3.3. Logic tags
            4. 19.1.4.3.4. Bean tags
          4. 19.1.4.4. Validation
            1. 19.1.4.4.1. Form bean validation
            2. 19.1.4.4.2. Struts Validator
            3. 19.1.4.4.3. Defining the validation rules
            4. 19.1.4.4.4. Business logic validation
        5. 19.1.5. Example application
          1. 19.1.5.1. How It Works
          2. 19.1.5.2. Adding enhancements
          3. 19.1.5.3. How It Works
          4. 19.1.5.4. How It Works
          5. 19.1.5.5. How It Works
      2. 19.2. Summary
      3. 19.3. Exercises
    6. 20. Layout Management with Tiles
      1. 20.1. Introduction to Tiles
        1. 20.1.1. What is the Tiles framework?
        2. 20.1.2. Tiles terminology
          1. 20.1.2.1. Layout
          2. 20.1.2.2. Tile
          3. 20.1.2.3. Definition
        3. 20.1.3. Installing Tiles
          1. 20.1.3.1. How It Works
      2. 20.2. Tile Scope
      3. 20.3. Definitions
      4. 20.4. Tiles Tags
        1. 20.4.1. insert
        2. 20.4.2. definition
        3. 20.4.3. put
        4. 20.4.4. putList
        5. 20.4.5. add
        6. 20.4.6. get
        7. 20.4.7. getAsString
        8. 20.4.8. useAttribute
        9. 20.4.9. importAttribute
        10. 20.4.10. initComponentDefinitions
      5. 20.5. Passing Parameters to Tiles
      6. 20.6. Advanced Tiles
        1. 20.6.1. Definitions and inheritance
          1. 20.6.1.1. How It Works
        2. 20.6.2. Nesting tiles
          1. 20.6.2.1. How It Works
          2. 20.6.2.2. How It Works
      7. 20.7. Tiles and Struts
        1. 20.7.1. Configuring Tiles with Struts
        2. 20.7.2. Tiles definitions as action forwards
        3. 20.7.3. Passing values from Struts to Tiles
          1. 20.7.3.1. How It Works
      8. 20.8. Summary
      9. 20.9. Exercises
    7. 21. JavaServer Faces
      1. 21.1. Configuring a JSF Project
      2. 21.2. Getting Started with JSF
        1. 21.2.1.
          1. 21.2.1.1. How It Works
          2. 21.2.1.2. How It Works
        2. 21.2.2. Using backing beans
          1. 21.2.2.1. How It Works
        3. 21.2.3. Managed beans
        4. 21.2.4. Controlling navigation
          1. 21.2.4.1. How It Works
        5. 21.2.5. Preventing direct access to Faces JSP files
      3. 21.3. JSF Lifecycle
        1. 21.3.1. Restore view
        2. 21.3.2. Apply request values
        3. 21.3.3. Process validations
        4. 21.3.4. Update model values
        5. 21.3.5. Invoke application
        6. 21.3.6. Render response
      4. 21.4. Validating Data
        1. 21.4.1.
          1. 21.4.1.1. How It Works
        2. 21.4.2. Using standard validators
        3. 21.4.3. Creating your own validation
          1. 21.4.3.1. Implementing the Validator Interface
          2. 21.4.3.2. How It Works
          3. 21.4.3.3. Creating a custom validator tag
          4. 21.4.3.4. How It Works
          5. 21.4.3.5. How It Works
          6. 21.4.3.6. Using the backing bean
      5. 21.5. Converting Data
        1. 21.5.1.
          1. 21.5.1.1. How It Works
        2. 21.5.2. Standard converters
          1. 21.5.2.1. Converting dates and times
          2. 21.5.2.2. Converting numbers
        3. 21.5.3. Implementing the Converter interface
          1. 21.5.3.1. How It Works
      6. 21.6. Handling Events with Listeners
        1. 21.6.1.
          1. 21.6.1.1. How It Works
          2. 21.6.1.2. How It Works
      7. 21.7. JSF versus Struts
      8. 21.8. Summary
      9. 21.9. Exercises
    8. 22. JSP in J2EE
      1. 22.1. Overview of J2EE
        1. 22.1.1. What is J2EE?
        2. 22.1.2. What does a container do?
      2. 22.2. J2EE Technologies
        1. 22.2.1. J2EE APIs
        2. 22.2.2. J2EE platform architecture
        3. 22.2.3. JSP development scenarios
      3. 22.3. Using JSP with J2EE Components
        1. 22.3.1. Servlets
          1. 22.3.1.1. Servlet example
          2. 22.3.1.2. How It Works
        2. 22.3.2. JNDI
          1. 22.3.2.1. How It Works
        3. 22.3.3. JDBC
          1. 22.3.3.1. JDBC example
          2. 22.3.3.2. How It Works
      4. 22.4. EJB
        1. 22.4.1. Benefits of EJB
        2. 22.4.2. Restrictions on EJB
        3. 22.4.3. Types of EJB
        4. 22.4.4. Session beans
        5. 22.4.5. Entity beans
        6. 22.4.6. Message-driven beans
        7. 22.4.7. Timer Service
      5. 22.5. Summary
      6. 22.6. Exercises
    9. 23. Access to Databases
      1. 23.1. Introduction to Databases
        1. 23.1.1. Connecting to a database
          1. 23.1.1.1. Type 1: JDBC-ODBC bridge
          2. 23.1.1.2. Type 2: Native API/Partly Java driver
          3. 23.1.1.3. Type 3: Net Protocol/All Java driver
          4. 23.1.1.4. Type 4: Native Protocol/All Java driver
          5. 23.1.1.5. Using a JDBC driver
        2. 23.1.2. Downloading and Installing MySQL
          1. 23.1.2.1. Downloading MySQL
          2. 23.1.2.2. Installing MySQL
          3. 23.1.2.3. Installing the JDBC driver
          4. 23.1.2.4. Starting MySQL
        3. 23.1.3. JDBC APIs
          1. 23.1.3.1. java.sql packages
          2. 23.1.3.2. javax.sql
          3. 23.1.3.3. JDBC connection and database access
          4. 23.1.3.4. JDBC data types
            1. 23.1.3.4.1. Creating a database
          5. 23.1.3.5. Creating the roster administration
            1. 23.1.3.5.1. Web application directory setup
            2. 23.1.3.5.2. Creating the administration servlet
          6. 23.1.3.6. How It Works
          7. 23.1.3.7. How It Works
            1. 23.1.3.7.1. Running the application
      2. 23.2. Building Applications
        1. 23.2.1. Data characteristics
        2. 23.2.2. Transactions
          1. 23.2.2.1. Effects of transactions
        3. 23.2.3. Object-relational mapping
      3. 23.3. Different Types of Applications
        1. 23.3.1. Simple applications
        2. 23.3.2. Using JSP and JDBC
          1. 23.3.2.1. How It Works
        3. 23.3.3. More complex applications
      4. 23.4. Using Hibernate
        1. 23.4.1. Installing Hibernate
          1. 23.4.1.1. How It Works
          2. 23.4.1.2. How It Works
          3. 23.4.1.3. How It Works
            1. 23.4.1.3.1. Managing object relationships with Hibernate
          4. 23.4.1.4. How It Works
      5. 23.5. Summary
    10. 24. Security
      1. 24.1. Areas of Security
        1. 24.1.1. Authentication
        2. 24.1.2. Authorization
        3. 24.1.3. Data integrity
        4. 24.1.4. Confidentiality
      2. 24.2. Data Integrity and Confidentiality
        1. 24.2.1. Implementing SSL
          1. 24.2.1.1. Obtaining JSSE
          2. 24.2.1.2. Creating keys and certificates
          3. 24.2.1.3. How It Works
          4. 24.2.1.4. Configuring Tomcat
          5. 24.2.1.5. How It Works
      3. 24.3. Authentication
        1. 24.3.1. HTTP BASIC authentication
          1. 24.3.1.1. How It Works
        2. 24.3.2. Form-based authentication
          1. 24.3.2.1. How It Works
          2. 24.3.2.2. How It Works
        3. 24.3.3. Client-certificate authentication
          1. 24.3.3.1. Personal certificates
          2. 24.3.3.2. How It Works
          3. 24.3.3.3. How It Works
      4. 24.4. Authorization
        1. 24.4.1. Container
        2. 24.4.2. Programmatic
          1. 24.4.2.1. How It Works
      5. 24.5. Summary
      6. 24.6. Exercises
    11. 25. Performance
      1. 25.1. Performance Concepts
        1. 25.1.1. What to measure
        2. 25.1.2. The user's perspective
        3. 25.1.3. How to measure performance
        4. 25.1.4. What to do after performance testing
      2. 25.2. Measuring Performance Using JMeter
        1. 25.2.1. Installing JMeter
        2. 25.2.2. JMeter concepts
          1. 25.2.2.1. How It Works
      3. 25.3. Performance Tuning Tips
        1. 25.3.1. Development-time measures
          1. 25.3.1.1. Avoid creating sessions for JSPs if not required
          2. 25.3.1.2. Session objects should be small in size
          3. 25.3.1.3. Time out sessions quickly
          4. 25.3.1.4. Use the right scope for objects
          5. 25.3.1.5. Use connection pooling for performance
          6. 25.3.1.6. Cache data
          7. 25.3.1.7. Use transfer objects
          8. 25.3.1.8. Minimize logging
        2. 25.3.2. Deployment-time measures
          1. 25.3.2.1. Precompile JSPs
          2. 25.3.2.2. JSP modification-time checks
          3. 25.3.2.3. Custom tag pooling
          4. 25.3.2.4. Using Web servers for static content
      4. 25.4. Summary
    12. 26. Best Practices and Tools
      1. 26.1. Development Methodologies
        1. 26.1.1. Waterfall and iterative methodologies
        2. 26.1.2. Rational Unified Process
        3. 26.1.3. Extreme Programming
        4. 26.1.4. Test-driven development
        5. 26.1.5. Feature-driven development
      2. 26.2. Development Tools
        1. 26.2.1. Version-control tools
        2. 26.2.2. Build tools
        3. 26.2.3. Testing tools
        4. 26.2.4. Logging tools
        5. 26.2.5. Tools for enforcing coding standards
      3. 26.3. Apache Ant
        1. 26.3.1. Installing Ant
        2. 26.3.2. Ant concepts
          1. 26.3.2.1. Ant tasks
        3. 26.3.3. Additional resources
      4. 26.4. CVS
        1. 26.4.1. Installing CVS
        2. 26.4.2. CVS concepts
        3. 26.4.3. Connecting to a CVS server
        4. 26.4.4. Checking in code
        5. 26.4.5. Checking out code
        6. 26.4.6. Comparing changes across revisions
          1. 26.4.6.1. Managing code versions through Ant scripts
        7. 26.4.7. Additional resources
      5. 26.5. JUnit
        1. 26.5.1. Installing JUnit
        2. 26.5.2. JUnit concepts
          1. 26.5.2.1. Running JUnit tests from Ant scripts
        3. 26.5.3. Additional resources
      6. 26.6. HttpUnit
        1. 26.6.1. Installing HttpUnit
        2. 26.6.2. HttpUnit concepts
        3. 26.6.3. Additional resources
      7. 26.7. Best Practices for Web Development
        1. 26.7.1. Follow good JSP coding practices
        2. 26.7.2. Separate application logic and presentation
        3. 26.7.3. Use design patterns where appropriate
        4. 26.7.4. Use frameworks for developing applications
        5. 26.7.5. Early testing and integration
      8. 26.8. Summary
      9. 26.9. Exercises
  8. III. Spreading Your New Wings: Applying JSP in the Real World
    1. 27. JSP Project I: Personalized Portal
      1. 27.1. The Portal Project
        1. 27.1.1. Introduction to RSS
          1. 27.1.1.1. The Importance of RSS
        2. 27.1.2. Introduction to Web services
          1. 27.1.2.1. The Importance of Web services
            1. 27.1.2.1.1. Enterprise application integration
            2. 27.1.2.1.2. Web sites as applications
      2. 27.2. Project Features
        1. 27.2.1. Use cases
        2. 27.2.2. Initial analysis
      3. 27.3. The Application Design
        1. 27.3.1. Designing the persistent store
        2. 27.3.2. Defining the key entity objects
        3. 27.3.3. Designing the Web site control flow
      4. 27.4. The Development Environment
        1. 27.4.1. Directory structure
        2. 27.4.2. Build scripts
        3. 27.4.3. Struts
        4. 27.4.4. Tiles
        5. 27.4.5. Log4j
        6. 27.4.6. Rome
        7. 27.4.7. Apache Axis
      5. 27.5. The Application
        1. 27.5.1. View
        2. 27.5.2. Controller
        3. 27.5.3. Running the portal application
      6. 27.6. Summary
      7. 27.7. Exercises
    2. 28. JSP Project II: Shopping Cart Application
      1. 28.1. The Bookstore Project
        1. 28.1.1. Project features
        2. 28.1.2. Use cases
        3. 28.1.3. Initial analysis
      2. 28.2. Application Design
        1. 28.2.1. Database design
        2. 28.2.2. Defining the key entity objects
          1. 28.2.2.1. BaseEntity
          2. 28.2.2.2. CustomerOrder
          3. 28.2.2.3. OrderItem
            1. 28.2.2.3.1. OrderStatus
          4. 28.2.2.4. Category
          5. 28.2.2.5. Book
            1. 28.2.2.5.1. ShoppingCart
          6. 28.2.2.6. Persistence management design
            1. 28.2.2.6.1. SessionProvider
            2. 28.2.2.6.2. EntityManager and EntityManagerFactory
          7. 28.2.2.7. Controller object design
      3. 28.3. The Development Environment and Its Configuration
        1. 28.3.1. Directory structure
          1. 28.3.1.1. Packages
        2. 28.3.2. Tomcat
        3. 28.3.3. Ant
          1. 28.3.3.1. Properties customization
          2. 28.3.3.2. Classpath
          3. 28.3.3.3. Runtime resources
          4. 28.3.3.4. Targets
        4. 28.3.4. Database
        5. 28.3.5. Hibernate
          1. 28.3.5.1. Book.hbm.xml
          2. 28.3.5.2. Category.hbm.xml
          3. 28.3.5.3. CustomerOrder.hbm.xml
          4. 28.3.5.4. OrderItem.hbm.xml
          5. 28.3.5.5. OrderStatus.hbm.xml
        6. 28.3.6. Struts, Validator, and Tiles
        7. 28.3.7. web.xml
      4. 28.4. The Application
        1. 28.4.1. Application layout: Tiles
          1. 28.4.1.1. Menu tile definition
        2. 28.4.2. Cart status
        3. 28.4.3. Presenting a list of categories
        4. 28.4.4. Presenting a list of books
        5. 28.4.5. Adding a book to the shopping cart
        6. 28.4.6. Managing the shopping cart
        7. 28.4.7. Checkout
          1. 28.4.7.1. Validation
          2. 28.4.7.2. Saving the order
      5. 28.5. Summary
      6. 28.6. Exercises
  9. IV. Appendixes
    1. A. JSP Syntax Reference
      1. A.1. Scoping
        1. A.1.1. page scope
        2. A.1.2. request scope
        3. A.1.3. session scope
        4. A.1.4. application scope
      2. A.2. Implicit Objects
        1. A.2.1. The request object
        2. A.2.2. The response object
        3. A.2.3. The pageContext object
        4. A.2.4. The session object
        5. A.2.5. The application object
        6. A.2.6. The out object
        7. A.2.7. The config object
        8. A.2.8. The page object
        9. A.2.9. The exception object
      3. A.3. Directives
        1. A.3.1. The page directive
        2. A.3.2. The taglib directive
        3. A.3.3. The include directive
        4. A.3.4. Tag file directives
          1. A.3.4.1. The tag directive
          2. A.3.4.2. The attribute directive
          3. A.3.4.3. The variable directive
      4. A.4. Actions
        1. A.4.1. Standard actions
          1. A.4.1.1. The <jsp:useBean> action
          2. A.4.1.2. The <jsp:setProperty> action
          3. A.4.1.3. The <jsp:getProperty> action
          4. A.4.1.4. The <jsp:include> action
          5. A.4.1.5. The <jsp:forward> action
          6. A.4.1.6. The <jsp:params> action
          7. A.4.1.7. The <jsp:p aram> action
          8. A.4.1.8. The <jsp:plugin> action
          9. A.4.1.9. The <jsp:fallback> action
        2. A.4.2. Other JSP standard actions
      5. A.5. Scripting Elements
        1. A.5.1. Declaration scripting elements
        2. A.5.2. Scriptlets
        3. A.5.3. Expression scripting elements
    2. B. JSP Expression Language Reference
      1. B.1. EL Expressions
        1. B.1.1. EL expressions in-line with template data
        2. B.1.2. EL expressions in attribute values
      2. B.2. Accessing Arrays, Maps, Object Properties, and Collections
        1. B.2.1. Object properties access
        2. B.2.2. Array member access
        3. B.2.3. Java map access
        4. B.2.4. Java collection access
      3. B.3. Elements of EL Expressions
        1. B.3.1. Named variables
        2. B.3.2. Literals
        3. B.3.3. Operators
          1. B.3.3.1. Arithmetic operators
          2. B.3.3.2. Logical operators
          3. B.3.3.3. Comparison (relational) operators
          4. B.3.3.4. The empty operator
        4. B.3.4. Operator precedence
        5. B.3.5. Functions
          1. B.3.5.1. Namespace and EL functions
          2. B.3.5.2. EL function implementation: static methods of a Java class
      4. B.4. Type Conversions
        1. B.4.1. Coercion: automatic type conversion
          1. B.4.1.1. Boxing and unboxing
          2. B.4.1.2. Coercion to String
          3. B.4.1.3. Coercion to Number
          4. B.4.1.4. Coercion to Character
      5. B.5. Implicit Objects
        1. B.5.1. The pageContext implicit object
        2. B.5.2. The pageScope implicit object
        3. B.5.3. The requestScope implicit object
        4. B.5.4. The sessionScope implicit object
        5. B.5.5. The applicationScope implicit object
        6. B.5.6. The param implicit object
        7. B.5.7. The paramValues implicit object
        8. B.5.8. The header implicit object
        9. B.5.9. The headerValues implicit object
        10. B.5.10. The cookies implicit object
        11. B.5.11. The initParam implicit object
    3. C. JSTL Reference
      1. C.1. JSTL Core Tags
        1. C.1.1. catch
        2. C.1.2. choose
        3. C.1.3. if
        4. C.1.4. import
        5. C.1.5. forEach
        6. C.1.6. forTokens
        7. C.1.7. out
        8. C.1.8. otherwise
        9. C.1.9. param
        10. C.1.10. redirect
        11. C.1.11. remove
        12. C.1.12. set
        13. C.1.13. url
        14. C.1.14. when
      2. C.2. JSTL XML Tags
        1. C.2.1. choose
        2. C.2.2. forEach
        3. C.2.3. if
        4. C.2.4. otherwise
        5. C.2.5. out
        6. C.2.6. param
        7. C.2.7. parse
        8. C.2.8. set
        9. C.2.9. transform
        10. C.2.10. when
      3. C.3. JSTL Formatting Tags
        1. C.3.1. bundle
        2. C.3.2. formatDate
        3. C.3.3. formatNumber
        4. C.3.4. message
        5. C.3.5. param
        6. C.3.6. parseDate
        7. C.3.7. parseNumber
        8. C.3.8. requestEncoding
        9. C.3.9. setBundle
        10. C.3.10. setLocale
        11. C.3.11. setTimeZone
        12. C.3.12. timeZone
      4. C.4. JSTL SQL Tags
        1. C.4.1. dateParam
        2. C.4.2. param
        3. C.4.3. query
        4. C.4.4. setDataSource
        5. C.4.5. transaction
        6. C.4.6. update
      5. C.5. JSTL Functions
        1. C.5.1. contains
        2. C.5.2. containsIgnoreCase
        3. C.5.3. endsWith
        4. C.5.4. escapeXml
        5. C.5.5. indexOf
        6. C.5.6. join
        7. C.5.7. length
        8. C.5.8. replace
        9. C.5.9. split
        10. C.5.10. startsWith
        11. C.5.11. substring
        12. C.5.12. substringAfter
        13. C.5.13. substringBefore
        14. C.5.14. toLowerCase
        15. C.5.15. toUpperCase
        16. C.5.16. trim
    4. D. Exercise Solutions
      1. D.1. Chapter 1 Exercises
        1. D.1.1. Exercise 1
        2. D.1.2. Exercise 2
      2. D.2. Chapter 2 Exercises
        1. D.2.1. Exercise 1
        2. D.2.2. Exercise 2
      3. D.3. Chapter 3 Exercises
        1. D.3.1. Exercise 1
        2. D.3.2. Exercise 2
      4. D.4. Chapter 4 Exercises
        1. D.4.1. Exercise 1
        2. D.4.2. Exercise 2
      5. D.5. Chapter 5 Exercises
        1. D.5.1. Exercise 1
        2. D.5.2. Exercise 2
      6. D.6. Chapter 6 Exercises
        1. D.6.1. Exercise 1
        2. D.6.2. Exercise 2
      7. D.7. Chapter 7 Exercises
        1. D.7.1. Exercise 1
        2. D.7.2. Exercise 2
      8. D.8. Chapter 8 Exercises
        1. D.8.1. Exercise 1
        2. D.8.2. Exercise 2
      9. D.9. Chapter 9 Exercises
        1. D.9.1. Exercise 1
        2. D.9.2. Exercise 2
      10. D.10. Chapter 10 Exercises
        1. D.10.1. Exercise 1
        2. D.10.2. Exercise 2
      11. D.11. Chapter 11 Exercises
        1. D.11.1. Exercise 1
        2. D.11.2. Exercise 2
      12. D.12. Chapter 12 Exercises
        1. D.12.1. Exercise 1
        2. D.12.2. Exercise 2
      13. D.13. Chapter 13 Exercises
        1. D.13.1. Exercise 1
        2. D.13.2. Exercise 2
      14. D.14. Chapter 14 Exercises
        1. D.14.1. Exercise 1
        2. D.14.2. Exercise 2
        3. D.14.3. Exercise 3
      15. D.15. Chapter 15 Exercises
        1. D.15.1. Exercise 1
        2. D.15.2. Exercise 2
      16. D.16. Chapter 16 Exercises
        1. D.16.1. Exercise 1
        2. D.16.2. Exercise 2
        3. D.16.3. Exercise 3
      17. D.17. Chapter 17 Exercises
        1. D.17.1. Exercise 1
      18. D.18. Chapter 18 Exercises
        1. D.18.1. Exercise 1
      19. D.19. Chapter 19 Exercises
        1. D.19.1. Exercise 1
        2. D.19.2. Exercise 2
      20. D.20. Chapter 20 Exercises
        1. D.20.1. Exercise 1
        2. D.20.2. Exercise 2
      21. D.21. Chapter 21 Exercises
        1. D.21.1. Exercise 1
        2. D.21.2. Exercise 2
        3. D.21.3. Exercise 3
      22. D.22. Chapter 22 Exercises
        1. D.22.1. Exercise 1
        2. D.22.2. Exercise 2
      23. D.23. Chapter 24 Exercises
        1. D.23.1. Exercise 1
        2. D.23.2. Exercise 2
      24. D.24. Chapter 26 Exercises
        1. D.24.1. Exercise 1
      25. D.25. Chapter 27 Exercises
        1. D.25.1. Exercise 1
        2. D.25.2. Exercise 2
      26. D.26. Chapter 28 Exercises
        1. D.26.1. Exercise 1
        2. D.26.2. Exercise 2