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

时间:2022-09-18 10:06:27

I've a small doubt in my mind; could anyone please clarify me is the Tomcat web server or Web container?

我脑子里有一点怀疑;任何人都可以澄清我是Tomcat Web服务器还是Web容器?

3 个解决方案

#1


29  

It's both a web server (supports HTTP protocol) and a web container (supports JSP/Servlet API, also called "servlet container" at times).

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

#2


22  

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 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. 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.

如上所述,Tomcat既是Web服务器又是Web容器,但它并不是真正意义上的高性能Web服务器,也不包括Web服务器的典型功能。 Tomcat旨在与Apache Web服务器结合使用,其中Apache管理静态页面,缓存,重定向等,Tomcat处理容器(Web应用程序)功能。您经常会一起听到“Apache Tomcat”这个短语,它既是Tomcat项目的正确归属(作为Apache Foundation的一部分),也适合作为标签,因为它们通常一起用作包。

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). 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.

如果您没有高性能服务器要求和/或想要嵌入具有容器功能的相对简单的Web服务器,那么Tomcat就可以了(并且可能是最容易使用的嵌入式Web容器,与Jetty相当)。有趣的是,用作主要Tomcat引擎的Catalina类实际上是Embedded类的子类,可以在独立的Web应用程序中使用。

#3


-4  

A web server is any program that accepts incoming HTTP connections.

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

#1


29  

It's both a web server (supports HTTP protocol) and a web container (supports JSP/Servlet API, also called "servlet container" at times).

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

#2


22  

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 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. 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.

如上所述,Tomcat既是Web服务器又是Web容器,但它并不是真正意义上的高性能Web服务器,也不包括Web服务器的典型功能。 Tomcat旨在与Apache Web服务器结合使用,其中Apache管理静态页面,缓存,重定向等,Tomcat处理容器(Web应用程序)功能。您经常会一起听到“Apache Tomcat”这个短语,它既是Tomcat项目的正确归属(作为Apache Foundation的一部分),也适合作为标签,因为它们通常一起用作包。

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). 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.

如果您没有高性能服务器要求和/或想要嵌入具有容器功能的相对简单的Web服务器,那么Tomcat就可以了(并且可能是最容易使用的嵌入式Web容器,与Jetty相当)。有趣的是,用作主要Tomcat引擎的Catalina类实际上是Embedded类的子类,可以在独立的Web应用程序中使用。

#3


-4  

A web server is any program that accepts incoming HTTP connections.

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