Tomcat Chinese Manual (2)

xiaoxiao2021-03-06  41

However, there is a small "characteristic" related to Tomcat. Tomcat allows users to define the default value of all the Web.xml of all relationship environments by putting the default web.xml into the confed directory. When establishing a new relationship environment, Tomcat uses the default web.xml file as the basics. Set and apply item-specific web.xml (web-inf / web.xml files for application items) to override these defaults. Set Tomcat and Apache Web Server Servers until now, we have not discussed Tomcat as servers Only the server as an independent run. But there are some problems to explain: 1. When processed the static page, Tomcat is not as fast as Apache. 2. Tomcat is not as configured as Apache. 3. Tomcat is not as strong as Apache. 4 There are many websites that have been put in a particular Web Server for a long time, for example, using CGI scripts / server API modules / perl / php ... We can't assume that things left will be discarded. Based on the reasons, one Realistic website recommends using a web server, such as Apache, serving a service for the site's static page request, and use Tomcat as a servlet / jsp plugin. We are not prepared to discuss each different configuration, we will: 1. Cover Web Server Basic Behavior 2. Explain what configuration requires 3. Example web server operation on Apache is simply, the web server is always waiting for HTTP requests from the client. When the request arrives, the server will provide everything necessary to meet this request. Add a servlet container to some extent change this behavior. But the server still needs to process the following factors: load the servlet container interface library and initialize (before processing the request). When a request is received, check if it belongs to a servlet, if so, the interface library receives this request and processes. On the other hand, the interface library needs to know that he will serve some request, usually a mode based on the request, and where to guide this request. When the user wants to set the configuration using the virtual host, things become more complicated, or want multiple developers to develop JVMs for developing but use different servlet containers. We will discuss these two issues. The necessary configuration should consider the most obvious configuration is that the servlet URL has a representation of servlet in the servlet container. Obviously, you must know what to pass on the servlet container. We still need to provide additional configuration items into the conjugate of Web-Server or Servlet-Container. L Whether the Tomcat process can be achieved, we still need to provide the TCP / IP hostname / port number of configuration and Tomcat is listening. l You need to inform the web server interface library (so we can load in the start-up time) l Supply internal information such as where to record logs and how to record, and so on. All such information must appear in a Web server configuration or in a private configuration file used by the interface. Here's how to implement these configurations in Apache. This part of the implementation on Apache demonstrates how to configure Apache to work with Tomcat; and try to explain the configuration specification that may be used in depth. Other information can be found on the JSERV installation page.

转载请注明原文地址:https://www.9cbs.com/read-63275.html

New Post(0)