An Execution Trace
The following figure shows the run time trace for two actions supported by a tag handler 
implementing 
BodyTag
; setters are in italics, while actions are not.  The inner boxes highlight 
the portion of the protocol used to interact with the body of the tag. In this example, we are 
assuming that the second action has the same parent but one different attribute values.
h.setPageContext(pageContext);
h.setParent(parent);
h.setAttribute1(value1);
h.setAttribute2(value2);...
h.doStartTag()
out = pageContext.pushBody()
h.setBodyContent(out)
h.doInitBody()
[BODY]
Body Actions
h.doAfterBody()
....
[BODY]
h.doAfterBody()
......
out = pageContext.popBody()
h.doEndTag();
h.setAttribute2(value3);
h.doStartTag()
out = pageContext.pushBody()
h.setBodyContent(out)
h.doInitBody()
[BODY]
h.doAfterBody()
....
[BODY]
h.doAfterBody()
......
out = pageContext.popBody()
h.doEndTag();
h.release()
107
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.