How Tomcat improves performance on JSP pages

Source: Internet
Author: User

When using the database connection pool, Tomcat can support a very limited amount of concurrency. System resources are mainly consumed in two aspects:

1. database operations, frequently returning results from the database;

2. Tomcat parses the JAVA file.

The process of creating a. HTML static page based on a specific rule is called static page generation.

Advantages:No need to access the database, saving the maximum system consumption.Tomcat directly returns .html static files without parsing JAVA files to maximize efficiency.Security, avoiding errors caused by Invalid parameter passing.

Disadvantages:The generated large size. HTML static page requires a large amount of hard disk space.The interactive performance of dynamic pages is lost.The stable running dynamic page is the prerequisite for generating the. HTML static page.

At the beginning, the. HTML static page is a complex page that passes through the system (capture and capture dynamic pages, and save them as the. html file. therefore, capturing this part of the operation will be the core of generating static pages; and how to minimize the number of captured parsing operations depends on dynamic pages (for example: it is also unavoidable to preserve the rules of jsp. HTML static pages, how to use static pages to interact with users, and so on. summarize the following points:

1. Define rules

Replacement.

2. Path

If .html has too many static pages, it will inevitably be stored in different folders. Specifying an absolute path starting with the root directory on all Jsp pages is one of the solutions.

3. Interactive Performance

Static pages inevitably lose the interactive performance. For example, a static page can also be. jsp dynamic page. for example, a zero height and zero width can be nested. jsp files are used to count the number of times the information is read.

4. Optimization

Embedding a page, and nesting all static pages into such a file can help reduce the page size. (Note that this volume can only reduce the page file size, but does not help improve access efficiency)

5. Risks

Attention files and so on are all issues to be considered

  1. Functions and principles of several encodings in JSP and Servlet
  2. Apply JavaBean on the JSP page
  3. A brief overview of embedded objects in JSP
  4. Use JSP include mechanism to improve appearance
  5. Comparison between JSP features and other dynamic web page development technologies

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.