Tomcat top-level structure

First on the map:

 

Server:

A tomcat container and only one Server, which is representative of the container, and contains one or more Servive JNDI resources.

Parenthetically JNDI what is? JNDI --- Java Naming and Directory Interface (java Naming and Directory Interface), similar to the registration center of things,

For example, when we use the JDBC database connection, you need to specify the JDBC url, but the url of user names and passwords are likely to change, as a programmer,

We certainly do not want to focus on what database backend is why we need to register JavaEE JNDI parameters in the program, and then define the data source, direct access to the data source can use.

Service:

It contains one or more Connector, which is connected to Connector and a Engine.

Connector:

Can specify different protocols (support Http1.1, AJP), for receiving a request from a client, generating HttpRequest, HttpResponse object, and processing the request referred Engine

Engine:

It includes one or more Host, default localhost; Connector for receiving a request of all, and distributed according to different Host domain.

Host:

Virtual host, comprising one or more context, for receiving a request Engine distribution, and web-context according to the context processing distributed path.

Context:

That is, we know portions, web application; which contains a plurality of Servlet, for final processing requests from clients, and filled response.

Guess you like

Origin www.cnblogs.com/sniffs/p/12003067.html