JSP running mechanism diagram (from network)
instructions under each step
The JSP engine (Jspservlet) in the 1.tomcat container translates the JSP into a Xxx_jsp.java class that conforms to the servlet specification standard.
The 2.java compiler (Javac.exe) compiles the Java classes into binary bytecode . class files.
The 3.jsp engine loads the class file into the appropriate JVM memory area.
-----Above is the JSP in the servlet container compiled and loaded into the memory process---------
-----The following is the JSP run procedure for client request service side----------------
4. The browser connects to the Web server by means of a socket link, and the server initiates a thread if the servlet container does not find the JSP in the specified memory area. class file,
The servlet instance is created through Loadservlet.
5. Invoke the _jspinit () method of the servlet to initialize the page configuration, such as initializing the tag tag.
6. Execute the _jspservice () method, perform business logic processing, and output code that conforms to the HTML format standard (that is, the code that the browser can parse).
7._jspdestroy () will unload the servlet inside.
-----The process of JSP being torn----------------
The lifetime of the JSP