When a JSP page on the server is executed on the first request, the JSP engine on the server translates the JSP paging file into a Java file, compiles the Java file into a bytecode file, and then responds to the client's request by executing the bytecode file. When the JSP page is requested to execute again, the JSP engine executes the bytecode file directly to respond to the customer. This is also a reason for JSP faster than ASP. The first execution of a JSP page is often performed by the Server Manager, and the main work of this bytecode file is:
The normal HTML markup symbol (the static part of the page) in the JSP page is given to the client's browser for display
Execute the Java patch between "<%" and "%>" (the dynamic part of the JSP page) and give the execution result to the client's browser for display.
When multiple customers request a JSP page, the JSP engine initiates a thread for each client instead of starting a process, which is managed by the JSP engine server and is much more efficient than the traditional CGI-initiated process for each client.