HTML and CSS Reference
When you have a reusable component the next natural step is to use it in multiple projects or distribute it to other
developers for general consumption. Keep your classes in the package where they are. The only file you must relocate
is randomtext.taglib.xml . Place the file in the /META-INF directory of the package structure. Make sure that the
TLD file ends with .taglib.xml which is what the JSF implementation is searching for when detecting external tag
Listing 6-12. File Structure for Packaging Components
In this chapter we explored the various classes and interfaces that make up the JSF component architecture.
We touched upon two key classes, UIComponent and renderer, and the TLD file. When put together the classes and
file can produce reusable custom components for just about any purpose. As an example we developed a custom
component that talks to a REST website that generates random text based on a couple of parameters.