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.