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
Table of contents Overview CommonJS Specification...
This article shares with you how to use Navicat t...
Cleanly uninstall MySQL. Personally tested, this ...
Nginx uses regular expressions to automatically m...
Today we will talk about how to use Jenkins+power...
I believe some people have seen this picture of c...
Table of contents 1. How to monitor Tomcat 2. Jav...
Table of contents render.js part create-context.j...
I have been learning about algorithms recently an...
Table of contents 1. System environment 2. Operat...
Often when we open foreign websites, garbled char...
When it comes to understanding web design, many p...
Table of contents Basic Configuration Entry file ...
The specific upgrade script is as follows: Dynami...