Java Learning-jsp page cycle

Source: Internet
Author: User

1. The user makes a request. index.jsp

Whether to request this page for the first time, if so, the JSP engine converts the JSP file into a servlet, generates a bytecode file, and then executes the Jspinit () method. Executes only once when the bytecode is generated. The entire life cycle is performed only once. If it is not the first time, it will start parsing the bytecode directly. Then execute the Jspservice () method of the Servlet class.

Jspservice () method Description: For each request, the JSP engine creates a new thread to handle the request. This creates multiple threads if there are multiple simultaneous requests from the client. Each client corresponds to one thread. Note the thread synchronization issue. The servlet resides in memory. So the corresponding speed is very fast.

is the work directory that is stored in Tomcat.

If the JSP page changes, the corresponding bytecode is regenerated.

Java Learning-jsp page cycle

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.