Oracle JavaServer Pages Developer's Guide and Reference
Release 8.1.7

Part Number A83726-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Standard JSP Interfaces and Methods

Two standard interfaces, both in the javax.servlet.jsp package, are available to be implemented in code that is generated by a JSP translator:

JspPage is a generic interface that is not intended for use with any particular protocol. It extends the javax.servlet.Servlet interface.

HttpJspPage is an interface for JSP pages using the HTTP protocol. It extends JspPage and is typically implemented directly and automatically by any servlet class generated by a JSP translator.

JspPage specifies the following methods used in initializing and terminating instances of the generated class:

Any code for these methods must be included in scriptlets in your JSP page, as in the following example:

<%!
   void jspInit()
   {
      ...your implementation code...
   }
%>

(JSP syntax is described later in this chapter. See "Scripting Elements".)

HttpJspPage adds specification for the following method:

Code for this method is typically generated automatically by the translator and includes code from scriptlets in the JSP page, code resulting from any JSP directives, and any static content of the page. (JSP directives are used to provide information for the page, such as specifying the Java language for scriptlets and providing package imports. See "Directives".)

As with the Servlet methods discussed in "The Servlet Interface", the _jspService() method takes an HttpServiceRequest instance and an HttpServiceResponse instance as input.

The JspPage and HttpJspPage interfaces inherit the following methods from the Servlet interface:

Refer back to "The Servlet Interface" for a discussion of the Servlet interface and its key methods.



Go to previous page
Go to beginning of chapter
Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index