The Custom Tag (Custom tags) implements javax. servlet. jsp. tagext. Tag or javax. servlet. jsp. tagext. BodyTag.
Interface. Use javax. servlet. jsp. JspWriter to output.
The TagSupport class provides implicit implementation of the interface Tag. serialization and data sending.
Public class TagSupport extends java. lang. Object implements Tag, java. io. Serializable
BodyTagSupport class provides implicit implementation of interface BodyTag. inherits TagSupport
Public class BodyTagSupport extendsTagSupport implements BodyTag
When writing tag handler, We need to inherit the TagSupport class or BodyTagSupport class, and then reload doStartTag () and doEndTag ().
You can also further separate them and put the specific implementation in the bean.
The class of these custom labels should be placed in the WEB-INF/classes or WEB-INF/lib
Finally, package custom tag libraries into A. war file. For the. war file, the resource structure is shown in.
Control the ing by using the deployment descriptor.