1. Who is tomcat? 2. What can tomcat do? Tomcat is a web container. Web applications can be deployed to Tomcat, which provides web services. Multiple web applications can be deployed in one web container. These web applications can be services of the same domain name or multiple domain names. 3. What are the components of tomcat 4. How to quickly understand these components? We can assume that we are designing a web container, what should we design? The first generation: receiving requests, processing requests, and returning results to the entire web container, as shown in the following figure: Second generation: Separate connection management and processing logic During use, I found that it was annoying to open the socket connection, call the processing logic, and then close the socket connection every time. I simply let the Connector handle the closing of the socket connection, and let the Container handle the business logic of the request. That's it. Third generation: Support multiple network protocols The original goal was to design a web server or container. If you want to support more protocols, you need to create different Connectors and Containers. At this time, it becomes like this, where service wraps Connectors and Containers. Fourth generation: support for multiple web applications Since it is a container, it must support multiple applications. Each application has a Context and is isolated from each other. The architecture that supports multiple Contexts is as follows: Fifth generation: support for multiple domain names Contexts require not only physical isolation, but also logical isolation, such as app1.example.com accessing context1 and app1.test.com accessing context2. The architecture at this point should be like this: the host can support multiple contexts. 5. Summary:
In fact, it is a process of division of labor and refinement of components, similar to the refinement of social division of labor. Note that Container is also called engine in Tomcat. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: A simple explanation of MySQL parallel replication
>>: How to deeply understand React's ref attribute
Copy code The code is as follows: <!DOCTYPE ht...
Because I want the virtual machine to have its ow...
1. Differences between JSON.stringify() and JSON....
Table of contents 1. How to obtain different view...
Generally speaking, in order to get more complete...
This article shares the specific code for React t...
Most of this article refers to other tutorials on...
Preface There is a misunderstanding about the max...
First, let's simulate the data coming from th...
Table of contents Official introduction to Node.j...
You can view the container logs through the docke...
stat function and stat command Explanation of [in...
Code implementation: Copy code The code is as fol...
First of all, you need to know some characteristi...
Database application is an indispensable part of ...