Creating the code that goes behind a tag (in other words, the Java code that’s invoked when you put the tag in your JSP) isn’t trivial. We have a whole chapter (the next one) devoted to developing your own custom tag handlers. But the last part of this chapter is about how to use custom tags. What happens, for example, if someone hands you a custom tag library they created for your company or project? How do you know what the tags are and how to use them? With JSTL, it’s easy—the JSTL 1.1 specification documents each tag, including how to use each of the required and optional attributes.
But not every custom tag will come so nicely packaged and well-documented. You have to know how to figure out a tag even if the documentation is weak or nonexistent, and, one more thing—you have to know how to deploy a custom tag library.
To use a custom library, you MUST read the TLD.
Everything you need to know is in there.
Main things you have to know:
The tag name and syntax
The tag has a name, obviously. In <c:set>, the tag name is set, and the prefix is c. You can use any prefix you want, but the name comes from the TLD. The syntax includes things like required and optional attributes, whether the tag can have a body (and if so, what you can put there), the type of each attribute, and whether the attribute can be an expression (vs. a literal String).
The library URI
The URI is a unique identifier in the Tag Library Descriptor (TLD). In other words, ...