Name

JspPage

Synopsis

The JspPage interface must be implemented by the generated JSP page implementation classes. The interface defines a protocol with three 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. See also HttpJspPage.

The JspPage interface represents the basic, protocol-independent contract between the container and a JSP page implementation object. A protocol-dependent subinterface, such as HttpJspPage, must be implemented by the class generated from a JSP page.

The jspInit( ) and jspDestroy( ) methods can be defined by a JSP page author.

Synopsis

Interface name:

javax.servlet.jsp.JspPage

Extends:

javax.servlet.Servlet

Implemented by:

JSP page implementation classes

Methods

public void jspDestroy( )

This method is invoked when the JSP page implementation instance is about to be destroyed. It can be used to perform clean-up, such as saving the state kept in instance variables to permanent storage.

public void jspInit( )

This method is invoked when the JSP page implementation instance is initialized. It can be used to perform tasks such as restoring the state kept in instance variables from permanent storage.

Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.