An API is a collection of packages, classes, interfaces and sub-packages. And sub-package is also a collection of classes interfaces and sub sub packages etc.
The JSP API consists of two packages;
The javax.servlet.jsp package has two interfaces and some classes.
JspPage interface has provided two lifecycle methods.
public void jspInit(): This method is invoked only once during the life cycle of the JSP when first request is come to JSP page is requested. It is used to perform initialization. This method is same as the init() method of Servlet
public void jspDestroy(): This method is invoked only once during the life cycle of the JSP before the JSP page is destroyed.
HttpJspPage interface provided a single life cycle method called _jspService().
public void _jspService(): This method is invoked each time when request for the JSP page comes to the container. It is used to process the request. The underscore _ signifies that you cannot override this method.