javax.servlet.jsp |
Classes and interfaces for the Core JSP 2.0 API.
The javax.servlet.jsp package contains a number of classes and
interfaces that describe and define the contracts between a JSP page
implementation class and the runtime environment provided for an
instance of such a class by a conforming JSP container.
|
Java Source File Name | Type | Comment |
ErrorData.java | Class | Contains information about an error, for error pages.
The information contained in this instance is meaningless if not used
in the context of an error page. |
HttpJspPage.java | Interface | The HttpJspPage interface describes the interaction that a JSP Page
Implementation Class must satisfy when using the HTTP protocol. |
JspContext.java | Class |
JspContext serves as the base class for the
PageContext class and abstracts all information that is not specific
to servlets. |
JspEngineInfo.java | Class | The JspEngineInfo is an abstract class that provides information on the
current JSP engine. |
JspException.java | Class | A generic exception known to the JSP engine; uncaught
JspExceptions will result in an invocation of the errorpage
machinery. |
JspFactory.java | Class |
The JspFactory is an abstract class that defines a number of factory
methods available to a JSP page at runtime for the purposes of creating
instances of various interfaces and classes used to support the JSP
implementation. |
JspPage.java | Interface | The JspPage interface describes the generic interaction that a JSP Page
Implementation class must satisfy; pages that use the HTTP protocol
are described by the HttpJspPage interface.
Two plus One Methods
The interface defines a protocol with 3 methods; only two of
them: jspInit() and jspDestroy() are part of this interface as
the signature of the third method: _jspService() depends on
the specific protocol used and cannot be expressed in a generic
way in Java.
A class implementing this interface is responsible for invoking
the above methods at the appropriate time based on the
corresponding Servlet-based method invocations.
The jspInit() and jspDestroy() methods can be defined by a JSP
author, but the _jspService() method is defined automatically
by the JSP processor based on the contents of the JSP page.
_jspService()
The _jspService()method corresponds to the body of the JSP page. |
JspTagException.java | Class | Exception to be used by a Tag Handler to indicate some unrecoverable
error. |
JspWriter.java | Class |
The actions and template data in a JSP page is written using the
JspWriter object that is referenced by the implicit variable out which
is initialized automatically using methods in the PageContext object.
This abstract class emulates some of the functionality found in the
java.io.BufferedWriter and java.io.PrintWriter classes,
however it differs in that it throws java.io.IOException from the print
methods while PrintWriter does not.
Buffering
The initial JspWriter object is associated with the PrintWriter object
of the ServletResponse in a way that depends on whether the page is or
is not buffered. |
PageContext.java | Class |
PageContext extends JspContext to provide useful context information for
when JSP technology is used in a Servlet environment.
A PageContext instance provides access to all the namespaces associated
with a JSP page, provides access to several page attributes, as well as
a layer above the implementation details. |
SkipPageException.java | Class | Exception to indicate the calling page must cease evaluation.
Thrown by a simple tag handler to indicate that the remainder of
the page must not be evaluated. |