First, what is page static:
Simply put, if we access a link, the module corresponding to the server will process the request, go to the corresponding jsp interface, and finally generate the data we want to see. The disadvantage of this is obvious: because the server will process each request, if there are too many high concurrent requests, it will increase the pressure on the application server, and the server will be down if it is not good. So how to avoid it? If we save the result of the test.do request as an html file, and then access it every time the user accesses it, wouldn't the pressure on the application server be reduced?
So where do static pages come from? Can't let us handle each page manually? Here comes the content we want to explain, the static page generation scheme... What we need is to automatically generate a static page. When the user visits, it will automatically generate test.html and then display it to the user.
Second, let's briefly introduce the knowledge points that should be mastered in order to master the static page solution:
1. Basics - URL Rewrite
What is URL Rewrite? URL Rewrite. Use a simple example to illustrate the problem: enter the URL, but actually visit abc.com/test.action, then we can say that the URL is rewritten. This technology is widely used, and there are many open source tools that can achieve this function.
2. Basic - Servlet web.xml
If you don't know how a request matches a servlet in web.xml, search the servlet's documentation. This is not nonsense. Many people think that the matching method such as /xyz/*.do is effective.
If you don't know how to write a servlet yet, please search how to write a servlet. This is not a joke. Today, with all kinds of integration tools flying around, many people will not write a servlet from scratch.
Three, the basic program introduction