Thursday 15 March 2018

JSP API

An API is a collection of packages, classes, interfaces and sub-packages.
The JSP API consists of two packages;
·         javax.servlet.jsp
·         javax.servlet.jsp.tagext
javax.servlet.jsp package
The javax.servlet.jsp package has two interfaces and some classes.
Interfaces are
·         JspPage
·         HttpJspPage
Classes are
·         JspWriter
·         JspError
·         PageContext
·         JspFactory
·         JspEngineInfo
·         JspException
JspPage Interface
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
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.

1 comment:

  1. Python is an open-source, high level, interpreted programming language which offers great opportunities for object-oriented programming. Choosing a python training program from Red Prism Group, which is best training institute for python in noida.

    ReplyDelete

apply function in R

1) apply function: It takes 3 arguments matrix,margin and function.. Example: m<-matrix(c(1,2,3,4),nrow=2,ncol=2) m #1 indicates it is ap...