.
FIGURE 2 1 
A JSP page fragment
chunk1
chunk2
chunk3
chunk4
chunk5
For the example, we will assume the TLD and TagExtraInfo provides the information in 
TABLE 2 1
. 
TABLE 2 1 
TagInfo for the example
Tag
Handler
VariableInfo (name, type, scope)
foo
FooTag
myFoo, FooResult, AT_END
bar
BarTag
myBar, BarResult, AT_END
baz
BazTag
none
B.3.4.2
Implementation Code Fragment
The following code fragment can be used to implement the page fragment of 
FIGURE 2 1
.
static {JspFactory _fact = JspFactory.getDefaultFactory();
}
_jspService(HttpServetRequest req, HttpServletResponse res) {
PageContext pc = _fact.getPageContext(...); // once
Object tempObject = null;
int tempReturn;
// just as an example, let's initialize all the Tag handlers
FooTag footag = new FooTag();
BarTag bartag = new BarTag()
BazTag baztag = new BazTag();
JspWriter out = pageContext.getOut(); // the initial out
141
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.