The JavaTM Web Services Tutorial
Home
TOC
Index
PREV TOP NEXT
Divider

Custom Tags in JSP Pages

Stephanie Bodoff

The standard JSP tags for invoking operations on JavaBeans components and performing request dispatching simplify JSP page development and maintenance. JSP technology also provides a mechanism for encapsulating other types of dynamic functionality in custom tags, which are extensions to the JSP language. Custom tags are usually distributed in the form of a tag library, which defines a set of related custom tags and contains the objects that implement the tags.

Some examples of tasks that can be performed by custom tags include operations on implicit objects, processing forms, accessing databases and other enterprise services such as e-mail and directories, and performing flow control. JSP tag libraries are created by developers who are proficient at the Java programming language and expert in accessing data and other services, and are used by Web application designers who can focus on presentation issues rather than being concerned with how to access enterprise services. As well as encouraging division of labor between library developers and library users, custom tags increase productivity by encapsulating recurring tasks so that they can be reused across more than one application.

Tag libraries are receiving a great deal of attention in the JSP technology community. For more information about tag libraries and for pointers to some freely-available libraries, see

http://java.sun.com/products/jsp/taglibraries.html
 
In This Chapter
What Is a Custom Tag?
The Example JSP Pages
Using Tags
Declaring Tag Libraries
Making the Tag Library Implementation Available
Types of Tags
Defining Tags
Tag Handlers
Tag Library Descriptors
Simple Tags
Tags with Attributes
Tags with Bodies
Tags That Define Scripting Variables
Cooperating Tags
Examples
An Iteration Tag
A Template Tag Library
How Is a Tag Handler Invoked?
Divider
Home
TOC
Index
PREV TOP NEXT
Divider

This tutorial contains information on the 1.0 version of the Java Web Services Developer Pack.

All of the material in The Java Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.