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
- Functions and principles of several encodings in JSP and Servlet
- Apply JavaBean on the JSP page
- A brief overview of embedded objects in JSP
- Use JSP include mechanism to improve appearance
- Comparison between JSP features and other dynamic web page development technologies