O'Reilly logo

Advanced JavaServer Pages™ by David M. Geary

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

Chapter 1. CUSTOM TAG FUNDAMENTALS

Topics in this Chapter

  • Using Custom Tags—The JSP File

  • Defining Custom Tags—The TLD

  • Implementing Custom Tags—Tag Handlers

  • Specifying the TLD in WEB-INF/web.xml

  • The Tag Life Cycle

  • Thread Safety

  • Tags with Attributes

  • Accessing Page Information

  • Error Handling

  • The Tag Package

    • The Tag Interface

    • The TagSupport Class: Ancestors, Values, and IDs

  • Tags with Bodies

XML is a hot technology, in no small part because it's a simple metalanguage used to create tags. XML tags represent data specific to a particular domain; for example, the following XML fragment represents a CD collection:

<cd_collection>
    <cd>
      <artist>Radiohead</artist>
      <title>OK Computer</title>
      <price>$14.99</price>
    </cd>
    ...
</cd_collection>

Like XML, JSP can be used to create ...

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