The Java EE 5 Tutorial

Defining Attributes in a Tag Handler

For each tag attribute, you must define a set method in the tag handler that conforms to the JavaBeans architecture conventions. For example, consider the tag handler for the JSTL c:if tag:

<c:if test="${Clear}">

This tag handler contains the following method:

public void setTest(boolean test) {
    this.test = test;

As shown by the preceding example, the name of the attribute must match the name of the set method.