A.1.2
Call Functionality, No Body, Define Object
The example of Section 5.1.3.2 is a simple variation of the previous example:
In this case:.
Tag Library Descriptor
Indicates there are 3 mandatory attributes that are only translation time, and 
that BarTag is the handler for tag "bar".  For the example, assume that id is 
optional, in which case the TLD also indicates that as being the case.
The TLD also needs to indicate that BarExtraInfo is the name of the class that 
will provide information on the scripting variables introduced; see below.
BarTag
BarTag
 needs only provide a method for 
doStartTag()
. The method will 
interact with the 
PageContext
 data to register the created object with a 
name that is the value of the id attribute.
The attribute values are exposed as attributes and their values are set 
automatically by the JSP container.
BarExtraInfo
This class, to be instantiated at translation time, needs only define a 
getVariableInfo()
 method.  This method will look at the 
TagData
object it is passed and will return either null or an array of 
VariableInfo
objects of size 1, with the value corresponding to the scripting variable with 
name given by the it.
A.1.3
Template Mechanisms
Section 5.1.3.4 refers to a family of template mechanisms that have been used in the past.  
All of these mechanisms take some information and replace a token in the template page by 
either some fixed expansion or the result of some computation.
These mechanisms can be implemented through an empty bodied action that is mapped to 
Tag handler that uses the desired information to locate the wanted resource and pushes the 
information into the JspWriter.
A.1.4
A 0.92 like useBean
The useBean of 0.92 will be described here.  Note that the implementation will not be as 
efficient as ideal due to the need to do some computation at request evaluation time.  Some 
discussion of the issues will be included.
133
JavaServer Pages 1.1 Specification  
November 30, 1999




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.