j2ee: Creating Tags [8/27] Previous pageContentsNext page

A custom tag consists of a tag handler and a tag library descriptor

Types:

To use the tag:

A custom tag must implement the javax.servlet.jsp.tagext.Tag or javax.servlet.jsp.tagext.SimpleTag interface (which now extends javax.servlet.jsp.tagext.JspTag for organizational purposes

This is usually done by extending a base utility class

The Tag interface supplies doStartTag() and doEndTag()

BodyTag supplies doInitBody(), setBodyContent()

IterationTag supplies doAfterBody()

TryCatchFinally supplies doCatch(), doFinally() and helps tags manage resources better

Previous pageContentsNext page