6.9. Custom tag examples

This section describes a set of overly simple custom tags that demonstrate the techniques in the section on building custom tags. The TLD defines the three tags (called, caller and months), and source code is provided for the tag handler and TagExtraInfo class for each of the tags.

The caller and called tags demonstrate how one tag handler can reference the tag handler for another tag. The tag handler for a called tag will put itself into the page context using the specified id attribute value as a key. The tag handler for the caller tag will ask the page context for the object saved with an id equal to the value of the refld attribute. If the object is found, the caller tag handler will write out a message containing ...

Get WebSphere V3.5 Handbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.