[英]What happens when request comes to Tomcat server?
When request comes to Tomcat server, it checks the web.xml and based on url-mapping, Request will be redirected. 当请求到达Tomcat服务器时,它将检查web.xml,并基于url映射,将重定向请求。 This is okay if Tomcat server has only one application deployed in it.
如果Tomcat服务器中仅部署了一个应用程序,则可以。
But what happens when Tomcat server has more than one application deployed in it? 但是,当Tomcat服务器中部署了多个应用程序时会发生什么? When REQUEST comes to Tomcat server, how it knows which application it has to invoke?
当REQUEST进入Tomcat服务器时,它如何知道必须调用哪个应用程序? Someone told me there is a file called server.xml (or something like that) where we provide some url-mapping to each and every application that we deploy in server.
有人告诉我,有一个名为server.xml(或类似名称)的文件,我们在其中为我们部署在服务器中的每个应用程序提供一些url映射。 Based on that Tomcat redirects the Request to that particular application web.xml.
基于此,Tomcat将请求重定向到该特定应用程序web.xml。
Can someone please let me know the flow of Request processing? 有人可以让我知道请求处理的流程吗?
1) You just need to place your war files into Tomcat's webapps folder. 1)您只需要将war文件放入Tomcat的webapps文件夹中。
2) Tomcat expands each war file into a folder and automatically deploys all the war files. 2)Tomcat将每个war文件扩展到一个文件夹中,并自动部署所有war文件。
3) Once the applications are up, based on the request url defined in deployment descriptor, the request is directed to a particular application. 3)一旦应用程序启动,根据部署描述符中定义的请求URL,该请求将定向到特定的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.