JSP Learning Note One: The operation mechanism of JSP

Source: Internet
Author: User
Tags response code

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

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.