- You wish to use Interceptors that see every single request processed by this particular virtual host.
- You wish to run Catalina in with a standalone HTTP connector, but still want support for multiple virtual hosts.
The parent Container attached to a Host is generally an Engine, but may be some other implementation, or may be omitted if it is not necessary.
The child containers attached to a Host are generally implementations of Context (representing an individual servlet context).
代表一个Virtual Host,虚拟主机,每个虚拟主机和某个网络域名Domain Name相匹配
每个虚拟主机下都可以部署(deploy)一个或者多个Web App,每个Web App对应于一个Context,有一个Context path
当Host获得一个请求时,将把该请求匹配到某个Context上,然后把该请求交给该Context来处理匹配的方法是“最长匹配”,所以一个path==""的Context将成为该Host的默认Context 所有无法和其它Context的路径名匹配的请求都将最终和该默认Context匹配

博客介绍了使用拦截器查看特定虚拟主机处理的每个请求,以及在独立HTTP连接器中运行Catalina并支持多虚拟主机。还说明了虚拟主机与网络域名匹配,可部署多个Web App,每个对应一个Context,Host获请求后按最长匹配原则交给Context处理。
1024

被折叠的 条评论
为什么被折叠?



