简体   繁体   English

Tomcat--Web 服务器还是 Web 容器?

[英]Tomcat--Web Server or Web Container?

I've a small doubt in my mind;我心中有一个小小的疑问; could anyone please clarify me is the Tomcat web server or Web container?任何人都可以澄清我是Tomcat Web服务器还是Web容器?

它既Web 服务器(支持 HTTP 协议)又是Web 容器(支持 JSP/Servlet API,有时也称为“servlet 容器”)。

As mentioned above, Tomcat is both a web server and a web container, but it's not really meant to function as a high performance web server, nor does it include some features typical of a web server.如上所述,Tomcat 既是 Web 服务器又是 Web 容器,但它并不是真正意义上的高性能 Web 服务器,也不包含 Web 服务器的一些典型功能。 Tomcat is meant to be used in conjunction with the Apache web server, where Apache manages static pages, caching, redirection, etc. and Tomcat handles the container (web application) functions. Tomcat 旨在与 Apache Web 服务器结合使用,其中 Apache 管理静态页面、缓存、重定向等,而 Tomcat 处理容器(Web 应用程序)功能。 You'll often hear the phrase "Apache Tomcat" together, which is both a proper attribution of the Tomcat project (as part of the Apache Foundation), but also appropriate as a label, as they're usually used together as a package.您经常会听到“Apache Tomcat”这个词,这既是 Tomcat 项目(作为 Apache 基金会的一部分)的正确归属,也适合作为标签,因为它们通常作为一个包一起使用。

If you don't have an high performance server requirements and/or want to embed a relatively simple web server with container functionality, Tomcat is fine for that (and probably the easiest embedded web container to work with, comparable with Jetty).如果您没有高性能服务器要求和/或想要嵌入具有容器功能的相对简单的 Web 服务器,Tomcat 非常适合(并且可能是最容易使用的嵌入式 Web 容器,与 Jetty 相当)。 Interestingly, the Catalina class used as the main Tomcat engine is actually a subclass of the Embedded class that can be used in a standalone web application.有趣的是,用作 Tomcat 主引擎的Catalina类实际上是Embedded类的子类,可以在独立的 Web 应用程序中使用。

Web 服务器是任何接受传入 HTTP 连接的程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM