Java Reference
In-Depth Information
The
RESPONSE
Field
public static final java.lang.String RESPONSE
This field indicates a name used to store the
ServletResponse
in the
PageContext
name table.
The
SESSION
Field
public static final java.lang.String SESSION
This field indicates a name used to store the
HttpSession
in the
PageContext
name table.
The
SESSION_SCOPE
Field
public static final int SESSION_SCOPE
This field indicates the named reference that determines the scope of the
HttpSession
(if any)
associated with the servlet until the
HttpSession
is invalidated.
The
PageContext()
Method
public PageContext()
The
PageContext()
method is an empty default constructor. It has no parameters, returns no
value, and throws no exceptions.
The
findAttribute()
Method
public abstract java.lang.Object findAttribute(java.lang.String name)
The
findAttribute()
method searches for the named attribute in page, request, session, and
application scopes in order and returns the value associated or null. It throws no exceptions.
It has one parameter:
•
java.lang.String
It returns this value:
•
java.lang.Object
The
forward()
Method
public abstract void forward(java.lang.String relativeUrlPath)
throws javax.servlet.ServletException,
java.io.IOException
The
forward()
method is used to redirect or “forward” the current
ServletRequest
and
ServletResponse
to another active component in the application.
If the
relativeUrlPath
begins with a “/” then the URL specified is calculated relative to the
DOCROOT
of the
ServletContext
for this JSP. If the path does not begin with a “/” then the
URL specified is calculated relative to the URL of the request that was mapped to the calling
JSP. The
forward()
method returns no value.