First, the JSP operation mechanism: can execute JSP page execution divided into two stages, one is the translation phase, and one is the request phase.
1. Translation phase: The JSP page is converted into a servlet class.
2. Request phase: The Servlet class executes, sending the response result to the client.
The specific process is:
→→ user access to the appropriate JSP page
→→ server to find the appropriate JSP page
→→ server translates jsp into servlet source code
→→ Server translates servlet source code into class file
The →→ server loads the class file into memory and executes
The →→ server sends the resulting HTML code to the client and the client displays it according to the response code
In addition, if the JSP interface is executed for the first time, it will experience the above two stages.
If it is not the first time, only the request phase is made. This is why the second time the JSP page is executed is significantly faster than the first time.
If you modify the JSP page, the server will find the modification and re-execute the above two stages. Therefore, when modified, the access speed will be slow.
JSP Learning Note One: The operation mechanism of JSP