
Since the DOM is memory resident, evaluation of the XPath expressions is faster. * DOM – Document Object Model – This popular class of parsers read the entire XML file and construct the DOM in memory. Send dynamically generated content as a response to the client.įor first request all 6 steps will be executed but for next requests of this JSP page 2nd and 3rd step will not execute.XPath is used to retrieve and interpret information represented in XML files using either a DOM or SAX parser.Compile the auto generated servlet class.Web container translates the JSP page into a servlet.Note: In this method underscore (_) represents that implementation of this method is provided by auto generated servlet and it can’t be overridden by developer. Syntax: public void _jspService() throws ServletException,IOException _jspService(): This method is called by web container every time when a request is come for the jsp. Public interface HttpJspPage extends JspPage Methods of HttpJspPage interface:ġ. HttpJspPage interface extends the JspPage interface. Syntax: public void jspDestroy() HttpJspPage interface: This method is called by the web container only once. jspDestroy(): It is used to perform cleanup process before destroying jsp page. This method is called by the web container only once when first request comes.Ģ. jspInit(): It is used to perform initialization process. Public interface JspPage extends Servlet Methods of JspPage interface:ġ. JSP processor-generated servlet class must implement JspPage interface. and its sub packages provide the classes and interfaces facilitate the development of JSP. With this structure it simplifies the web development. JSP defines a structure which is java code inside HTML code. JSP is the extension of servlet that provides the solution of all above problems. A developer needs to write HTML code to the output stream of the servlet.Every time when presentation is changed servlet needs to compile and deploy again.In servlet presentation logic and dynamic content generation logic are intermixed which result into maintains problem.
