简体   繁体   English

当请求到Tomcat服务器时会发生什么?

[英]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.

相关问题 Tomcat:HTTP Multipart请求被中断时会发生什么? - Tomcat: what happens when a HTTP Multipart request gets interrupted? Tomcat:当连接数超过线程数时会发生什么? - Tomcat: what happens when number of connections exceeds number of threads? eclipse是否带有完整的内置tomcat服务器? - Does eclipse comes with complete inbuilt tomcat server? 当集群中相应的节点发生故障时,对请求的处理 - What happens to a request, when the corresponding node fails in a cluster 在@async带注释的函数中发生多个请求时会发生什么? - What happens when multiple request occurs in a @async annotated function? 当请求超时时,http servlet会发生什么? - What happens with http servlet when request times out? 从tomcat服务器中执行http请求的正确方法是什么 - what is the right way to do http request from within tomcat server 当客户端使用readTimeout关闭连接时,服务器上会发生什么 - what happens at the server when client closes the connection by using readTimeout 当消息到达服务器而不读取Java流时,消息会发生什么? - what happens to a message when it gets to a server without reading stream in java? 在服务器上修改正在下载的文件时会发生什么? - What happens when a file being downloaded is modified on the server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM