[JSP] operating principle of JSP

Source: Internet
Author: User
When a JSP page on the server is requested for execution for the first time, the JSP engine on the server first translates the JSP page file into a Java file, and then compiles the Java file to generate a bytecode file, then, you can run the bytecode file to respond to your request. When the JSP file is requested to be executed again, the JSP Engine will directly execute the bytecode file to respond to the customer. This is one of the reasons why JSP is faster than ASP.
The main work of bytecode files is: (1) Submit the common HTML Tag (static part of the page) on the JSP page to the client's browser for display. (2) execute Java between "<%" and "%>"ProgramSlice (dynamic part of the page), and submit the execution result to the client's browser for display. (3) When multiple customers request a JSP page, the JSP Engine automatically starts a thread (not a process) for each customer. These threads are managed by the JSP engine server, it is more efficient than the traditional CGI to start a process for each customer.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.