how JSP work.

Source: Internet
Author: User

A JSP page exists in three forms:

    • JSP Source code:
      • Consists of a mix of HTML template code.
      • Java language statements.
      • JSP directives and actions that describe the generate a Web page to service a particular request.
    • Java source code.
    • Compiled Java class.

Figure 5-1 illustrates the process used by the JSP container.

   

When a request for a JSP page was made, the container first determines the name of the class corresponding to the. jsp file .

If the class doesn ' t exist or if it ' s older than the.jsp file (meaning the JSP source has changed since it is last Compil ED),

Then the container creates Java source code for an equivalent servlet and compiles it.

If an instance of the servlet isn ' t already running,

The container loads the servlet class and creates an instance.

Finally, the container dispatches a thread to handle the current HTTP request in the loaded instance.

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.