Name

JspPage

Synopsis

The JspPage interface defines two methods, jspInit() and jspDestroy(), which are analogous to the init() and destroy() methods of regular servlets. The jspInit() method is called before the JSP serves any page requests and after the rest of the JSP’s initialization process. This means that the getServletConfig() method will return a valid javax.servlet.ServletConfig object when called from within the jspInit() method. The jspDestroy() method will be called when the container is shut down or when the JSP instance is unloaded. Both of the methods in this interface can be specified within a JSP page itself by defining the methods within a declaration element.

                  Returned By
public interface JspPage extends Servlet {
// Public Instance Methods
   public abstract void jspDestroy();  
   public abstract void jspInit();  
}

Implementations

HttpJspPage

Get Java Enterprise in a Nutshell, Second 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.