Chapter 10. Creating Custom Tags
Welcome to Day 10—yesterday, you took a look at using and creating custom tags, and today you'll get more of the story. Creating a custom tag is actually a very large topic in JSP, which is why two days are dedicated to them. Today, you'll learn how to:
Create a simple tag that inserts text into a Web page
Use the
pageContext
objectSupport custom tag attributes
Create iterator tags
Make custom tags cooperate, using
pageContext
attributesWork with scripting variables to pass data between JSP code and custom tag code
Tip
There's even more to the topic of custom tags than there's room for here. You might want to track down more information online—a good place to start is Sun's custom tag tutorial at http://java.sun.com/webservices/docs/ea1/tutorial/doc/JSPTags.html ...
Get Sams Teach Yourself JavaServer Pages™ in 21 Days 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.