Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to improve performance of JSP Page Tomcat

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Xiaobian to share with you how to improve the performance of JSP Tomcat page, I hope you have gained something after reading this article, let's discuss it together!

Tomcat can also support a limited amount of concurrency when using database connection pools. System resources are consumed primarily in two ways:

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

Tomcat analyzes Java files.

The process of creating a static page from a dynamic page according to certain rules is called generating a static page.

Advantages: No need to access the database, saving *** system consumption. Tomcat directly returns.html static files, without parsing JAVA files,*** limit efficiency. Security, avoid errors caused by illegal parameter transfer.

Cons: The large number of static.html pages generated takes up a lot of hard disk space. it lose that interactivity of dynamic pages. Running stable dynamic pages is a prerequisite for generating.html static pages.

Initially, static.html pages were created by the system frequently accessing (grabbing) dynamic pages, getting results, and saving them as.html files. Therefore, grabbing this part of the operation will be the core of generating static pages; and how to minimize the parsing operation after grabbing depends on the dynamic page (e.g.:Jsp page); what rules to save these.html static pages, how to use static pages to interact with users, etc. are also inevitable. Summarize the following:

1. Definition of rules

Most Jsp pages will no longer be user-facing, but for system calls, get run results, and thus save as.html files. Therefore,Jsp should replace all.jsp tags and links according to core code rules. Replaced by.html.

2. Path

If there are too many static.html pages, they will inevitably be stored in different folders. One solution is to specify an absolute path starting with the root directory in all Jsp pages.

3. Interactive performance

Static pages inevitably lose interactive performance, such as: unable to count the number of readings of information, unable to get Session information, etc. But there is no solution, the idea is to divide the whole static page into several small pages, small pages can still be.html static pages, can also be.Jsp dynamic pages. For example, you can nest a zero-height, zero-width.Jsp file specifically for reading statistics.

4. Optimization

If the amount of information is relatively large,.html static pages will also take up more hard disk capacity. Organizing common parts of static pages into a new.html page and nesting all static pages into one file helps reduce page size. (Note that this volume only reduces the file size of the page and does not help improve access efficiency)

5. Risk

The risk is concentrated in the process of generating static pages. Network anomaly may cause the returned Jsp page to run blank, frequent reading may cause the Jsp page to be saved as.html file without displaying the complete Jsp page, etc., all of which are issues to be considered.

After reading this article, I believe you have a certain understanding of "JSP page Tomcat how to improve performance", if you want to know more related knowledge, welcome to pay attention to the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report