Management of Nested Scopes
These methods enable the management of nested JspWriter streams to implement Tag 
Extensions. Note that 
pushBody()
 returns a 
BodyContent
, while 
popBody()
 returns a 
JspWriter
, which will need to be casted into a BodyContent in all but the top level.
pushBody()
Return a new 
BodyContent
 object, save the current "out" 
JspWriter
, 
and update the value of the "out" attribute in the page scope attribute 
namespace of the 
PageContext
popBody()
Return the previous 
JspWriter
 "out" saved by the matching 
pushBody()
, and update the value of the "out" attribute in the page scope 
attribute namespace of the 
PageContext
.
Management of PageContext Object
The following two methods provide management of the PageContext object itself. These 
methods are not intended to be used by the JSP page author.
initialize()
Initialize a PageContext with the given data.
release()
Release a PageContext object.
Forward and Includes
These methods encapsulate forwarding and inclusion.
forward()
This method is used to forward the current ServletRequest and ServletResponse 
to another component in the application.
The signature of this method is 
void forward(String relativeUrlPath) throws 
ServletException, IOException.
include()
This method causes the resource specified to be processed as part of the current 
ServletRequest and ServletResponse being processed by the calling Thread.
The signature of this method is 
void include(String relativeUrlPath) throws 
ServletException, IOException.
handlePageException()
Process an unhandled page level exception by performing a redirect.
The signature of this method is 
void handlePageException(Exception e) throws 
ServletException, IOException.
Appendix 6
JSP Technology Classes
120




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




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