JSP generates static page-tomcat improve the king of performance

Source: Internet
Author: User
Tags connection pooling tomcat

Common Classification Information home page, need to read at least six times database, other subpages, five to more than 10 times.

With database connection pooling, Tomcat can support a very limited amount of concurrency. system resources are mainly consumed in two aspects:

1, database operation, frequent return of results from the database;

2, Tomcat parsing Java files.

Create a dynamic page by a certain rule. The process of HTML pure static pages is called generating static pages.

Advantages

Saves the most system consumption without having to access the database.

Tomcat directly returns. html static files without parsing Java files to maximize efficiency.

Security to avoid errors caused by illegal passing of parameters.

Disadvantages

The number of generated. HTML static pages require more hard disk space.

The interactive performance of the dynamic page has been lost.

Running a stable dynamic page is a prerequisite for generating. HTML static pages.

At first, the. HTML static page is a dynamic page that is accessed (crawled) by the system frequently. Gets the result of the run, and then saves it as an. html file. Therefore, crawl this part of the operation will be the core of the generation of static pages, and how to minimize the crawl after the resolution operation, depending on the dynamic page (example: JSP page) What rules to keep these. html static pages, how to use static pages to interact with users, and so on, are also avoided. The following points are summarized:

1. Define Rules

Most of the JSP page will no longer be the face of the user, but for system calls, to get the results of the operation, thus saving as. html file. Therefore, the JSP should replace all the. JSP tags and connections according to the rules of the core code. Replaced by. html.

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.