The JavaServer Pages(tm) (JSP) 2.0 specification provides a portable mechanism for the description of tag libraries.
A JSP tag library contains
The JSP 2.0 specification and the reference implementation both contain simple and moderately complex examples of actions defined using this mechanism. These are available at JSP's web site, at http://java.sun.com/products/jsp. Some readers may want to consult those to get a quick feel for how the mechanisms work together.