The Java EE 5 Tutorial

Dynamic Attributes

A dynamic attribute is an attribute that is not specified in the definition of the tag. Dynamic attributes are used primarily by tags whose attributes are treated in a uniform manner but whose names are not necessarily known at development time.

For example, this tag accepts an arbitrary number of attributes whose values are colors and outputs a bulleted list of the attributes colored according to the values:

<colored:colored color1="red" color2="yellow" color3="blue"/>

You can also set the value of dynamic attributes using an EL expression or using the jsp:attribute element.