Skip navigation.
Downloads | Product Documentation | Support

Programming WebLogic JSP Tag Extensions

# Main Steps for Creating Custom JSP Tags

Perform the following steps to create and use custom JSP tags:

1. Write a tag handler class. When you use a custom tag in your JSP, this class executes the functionality of the tag. A tag handler class implements one of two interfaces: `javax.servlet.jsp.tagtext.BodyTag` or `javax.servlet.jsp.tagtext.Tag`. Your tag handler class is implemented as part of a tag library. For more information, see Implementing the Tag Handler.
2. Reference the tag library in your JSP source using the JSP `<taglib>` directive. A tag library is a collection of JSP tags. Include this directive at the top of your JSP source. For more information, see Referencing a Tag Library.
3. Write the Tag Library Descriptor (TLD). The TLD defines the tag library and provides additional information about each tag, such as the name of the tag handler class, attributes, and other information about the tags. For more information, see Creating a Tag Library Descriptor.
4. Reference the Tag Library Descriptor in the Web Application deployment descriptor (web.xml). For more information, see Writing Web Application Deployment Descriptors.
5. Use your custom tag in your JSP. For more information, see Using Custom Tags in a JSP.