1、一个tomcat可以配置多个host;

2、一个host可以包含多个应用:context;

3、一个应用可以包含多个servlet:servlet-path;

4、一个servlet可以包含多个request:request-path;

 

Tomcat’s Architecture

Tomcat’s architecture consists of a series of functional components that can be combined according to well-defined rules.

tomcat web的URL解析(web.xml)_tomcatTomcat Architecture

The structure of each server installation (via these functional components) is defined in the file ​​server.xml​​, which is located in the ​​/conf​​ subdirectory of Tomcat’s installation folder. Let’s discuss these components in detail.

https://howtodoinjava.com/tomcat/tomcats-architecture-and-server-xml-configuration-tutorial/

 

 

tomcat web的URL解析(web.xml)_xml_02

 

web.xmlの定義

URLパスよって呼び出されるサーブレットクラスの場所は次の図の通りである。また、URLパスとサーブレットのマッピングはweb.xmlに定義されている。

tomcat web的URL解析(web.xml)_html_03

 


------------------越是喧嚣的世界,越需要宁静的思考------------------ 合抱之木,生于毫末;九层之台,起于垒土;千里之行,始于足下。 积土成山,风雨兴焉;积水成渊,蛟龙生焉;积善成德,而神明自得,圣心备焉。故不积跬步,无以至千里;不积小流,无以成江海。骐骥一跃,不能十步;驽马十驾,功在不舍。锲而舍之,朽木不折;锲而不舍,金石可镂。蚓无爪牙之利,筋骨之强,上食埃土,下饮黄泉,用心一也。蟹六跪而二螯,非蛇鳝之穴无可寄托者,用心躁也。