Java Reference
In-Depth Information
The
initialize()
Method
public abstract void initialize(javax.servlet.Servlet servlet,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
java.lang.String errorPageURL,
boolean needsSession,
int bufferSize,
boolean autoFlush)
throws java.io.IOException,
java.lang.IllegalStateException,
java.lang.IllegalArgumentException
The
initialize()
method is called to initialize an un-initialized
PageContext
so that it can be
used by a JSP
Implementation
class to service an incoming request and response within its
_jspService()
method.
This method is typically called from
JspFactory.getPageContext()
in order to initialize
state.
This method is required to create an initial
JspWriter
, and associate the “out” name in page
scope with this newly created object. It returns no value.
D
It has seven parameters:
•
javax.servlet.Servlet
•
javax.servlet.ServletRequest
•
javax.servlet.ServletResponse
•
java.lang.String
•
boolean
•
int
•
boolean
It throws these exceptions:
•
java.io.IOException
•
java.lang.IllegalStateException
•
java.lang.IllegalArgumentException
The
popBody()
Method
public abstract JspWriter popBody()
The
popBody()
method returns the previous
JspWriter
“out” saved by the matching
pushBody()
method, and updates the value of the “out” attribute in the page scope attribute
namespace of the
PageConxtext
. This method has no parameters and throws no exceptions.