Tomcat--Web Server or Web Container?

后端 未结 3 771
醉酒成梦
醉酒成梦 2021-01-31 18:11

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

3条回答
  •  一向
    一向 (楼主)
    2021-01-31 18:53

    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.

    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.

提交回复
热议问题