Send your remarks, comments or wishes to doc team
Subject:
Message:
Your name:
Your email:

JBoss.org Community Documentation

- Prev
- Next

## 4.8. Creating tag class and descriptors for JSP and Facelets

The last step is to create a JSP tag handler and descriptors.

JSF components are not inherently tied to JSP. You will use a custom tag (a.k.a action) on the JSP page to indicate which JSF `UIComponent` is needed for the application. The custom tag has a corresponding tag handler class, which is responsible for creating the `UIComponent` and transferring each declarative JSP tag attribute to the `UIComponent` instance. Hence you need a custom tag class that returns the component type (`org.mycompany.InputDate`) and the renderer (`org.mycompany.InputDateRenderer`).

After the tag class creation you need to register it in the descriptors: in the TLD (Tag Library Descriptor) file for JSP pages and in the inputDate.taglib.xml file for Facelets.

But you know that inputDate.xml configuration file generates the JSP tag handler and descriptors instead of you! Just proceed to the inputDate folder and launch the following command:

    mvn clean install

After the generation process you will find in the inputDate/target/classes/META-INF folder inputDate.tld, inputDate.taglib.xml, resources-config.xml, and faces-config.xml files.

The `InputDateTag` class could be found in the inputDate/target/classes/org/mycompany/taglib.

Well done! The <inputDate> component is created. The inputDate-1.0-SNAPSHOT.jar for the component usage could be found in the inputDate/target folder.

- Prev4.7. Configuring component
- Top of page
- Front page
- NextChapter 5. Component usage overview