C H A PT E R
This chapter describes the mechanisms for defining new actions in portable way and for
introducing new actions into a JSP page.
A Tag Library abstracts some functionality by defining a specialized (sub)language that
enables a more natural use of that functionality within JSP pages. The actions introduced by
the Tag Library can be used by the JSP page author in JSP pages explicitly, when authoring
the page manually, or implicitly, when using an authoring tool. Tag Libraries are particularly
useful to authoring tools because they make intent explicit and the parameters expressed in
the action instance provide information to the tool.
Actions that are delivered as tag libraries are imported into a JSP page using the
directive, and can then be used in the page using the prefix given by the directive. An action
can create new objects that can then be passed to other actions or can be manipulated
programmatically through an scripting element in the JSP page.
Tag libraries are portable: they can be used in any legal JSP page regardless of the scripting
language used in that page.
The tag extension mechanism includes information to:
Execute a JSP page that uses the tag library.
Author and modify a JSP page.
Present the JSP page to the end user.
The JSP 1.1 specification mostly includes the first kind of information, plus basic
information of the other two kinds. Later releases of the JSP specification may provide
additional information; in the meanwhile, vendors may use vendor specific information to
address their needs.