Chapter 4: Tomcat Architecture The Service A Service
Chapter 4: Tomcat Architecture The Service A Service groups a container (usually of type Engine) with a set of Connectors and is a top-level component. An Engine is a request-processing component that represents the Catalina Servlet engine. It examines the HTTP headers to determine the virtual host or context to which requests should be passed. Each Service represents a grouping of Connectors (components that manage the connection between the client and server) and a single container, which accepts requests from the Connectors and processes the requests to present them to the appropriate Host. Each Service is named so that administrators can easily identify log messages sent from each Service. In other words, the container contains the Web applications. It is responsible for accepting requests, routing them to the specified Web application and specific resources, and returning the result of the processing of the request. Connectors stand between the client making the request and the container. They provide additional services such as SSL support. Multiple Service objects may be children to the Server. However, most of the time, you will use only a single Service in a container. Tomcat typically uses the StandardServiceobject as the service that implements the Serviceinterface. The Connectors Connectors connect the applications to clients. They represent the point at which requests are received from clients and are assigned a port on the server. The default port for non-secure HTTP applications is kept as 8080 to avoid interference with any Web server running on the standard HTTP port, but there is no reason why this cannot be changed as long as the port is free. Multiple Connectors may be set up for a single Engine or Engine-level component, but they must have unique port numbers. The default port to which browsers make requests if a port number is not specified is port 80. If Tomcat is run in standalone mode, the port for the primary Connector of the Web application can be changed to 80 by reconfiguring this component. The default Connector is Coyote, which implements HTTP 1.1; Tomcat also comes with an AJP connector. In addition, the HTTP connector can be used with SSL as well. Both the HTTP and AJP connectors are fully supported by Tomcat. However, there are alternative Connectors, such as the old JServ and JK2, which work, but are no longer supported. These are discussed later in this chapter. The Engine The next component in the architecture is the top-level container a container object that cannot be contained by another container. This means that it is guaranteed not to have a parent container. It is at this level that the objects begin to aggregate child components. Strictly speaking, the container does not need to be an Engine; it just has to implement the container interface. This interface mandates the following: that the object implementing it is aware of its position in the hierarchy (it knows its parent and its children), that it provides access to logging, that it provides a Realm for user authentication and role-based authorization, and that it has access to a number of resources, including its session manager (and some internally important aspects that you do not need to worry about).
If you looking for unlimited one inclusive web hosting plan please check web hosting plan website.