A P P E N D I X
This appendix describes some examples of custom actions defined using the Tag Extension
mechanism. Refer to the JSP technology web site (http://java.sun.com/products/jsp) to
retrieve a copy of the examples.
Each example is described briefly and the methods that are defined are explained and
Most tags are likely to be simple encapsulations of some functionality. The first set of
examples are of this type and were already introduced in Section 5.1.3; here they are
described in some more detail.
Call Functionality, no Body
The example of Section 18.104.22.168 is the simplest example:
In this case:
Tag Library Descriptor
Indicates there are 3 mandatory attributes that are only translation time, and
that FooTag is the handler for tag "foo".
FooTag needs only provide a method for doStartTag(). The method
performs the desired actions, possibly interact with the
The attribute values are exposed as attributes and their values are set
automatically by the JSP container.