[ Team LiB ] Previous Section Next Section

Hour 16. Extending JSP with New Tags

What You'll Learn in This Hour:

  • How to build custom tags using classic tag handlers

  • How to create and use tags using SimpleTag

  • How to use tag files

JSP tag extensions let you create new tags that you can insert directly into a JavaServer Page just as you would the built-in tags you learned about in earlier hours. Through tag extensions, you can define tags that let you insert data into the output stream, include sections of a page only if certain conditions are met, and even modify the contents of the page itself before they are sent back to the browser. They can act like functions, performing actions or modifying variables. Tags allow you to build pages that are consistent in their expression, by eliminating the intermixing of code with elements and template data. They also provide a great way to build reusable elements.

The JSP 2.0 specification includes significant improvements that make it easier to construct and use tag extensions. Where it used to be an advanced subject, it's now something that should be in the toolkit of every JSP developer.

    [ Team LiB ] Previous Section Next Section