Java 什么是Tomcat组件?什么是卡特琳娜和郊狼?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32985051/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 14:07:08  来源:igfitidea点击:

What are the Tomcat Component? What is Catalina and Coyote?

javatomcatcatalina

提问by Piyush Ghediya

Can anyone describe

谁能描述一下

  • What is component in Tomcat and what is role of it in Tomcat server?

  • What is Coyote?

  • What is Catalina?

  • Tomcat 中的组件是什么,它在 Tomcat 服务器中的作用是什么?

  • 什么是郊狼?

  • 什么是卡特琳娜?

回答by a3.14_Infinity

Catalinais Tomcat's servlet container. Catalina implements Sun Microsystems' specifications for servlet and JavaServer Pages (JSP). In Tomcat, a Realm element represents a "database" of usernames, passwords, and roles (similar to Unix groups) assigned to those users. Different implementations of Realm allow Catalina to be integrated into environments where such authentication information is already being created and maintained, and then use that information to implement Container Managed Security as described in the Servlet Specification

Catalina是 Tomcat 的 servlet 容器。Catalina 实现了 Sun Microsystems 的 servlet 和 JavaServer Pages (JSP) 规范。在 Tomcat 中,Realm 元素代表分配给这些用户的用户名、密码和角色(类似于 Unix 组)的“数据库”。Realm 的不同实现允许 Catalina 集成到已经创建和维护此类身份验证信息的环境中,然后使用该信息来实现容器管理安全性,如 Servlet 规范中所述

Coyoteis a Connector component for Tomcat that supports the HTTP 1.1 protocol as a web server. This allows Catalina, nominally a Java Servlet or JSP container, to also act as a plain web server that serves local files as HTTP documents.

Coyote是 Tomcat 的连接器组件,支持 HTTP 1.1 协议作为 Web 服务器。这允许 Catalina(名义上是 Java Servlet 或 JSP 容器)也可以充当普通 Web 服务器,将本地文件作为 HTTP 文档提供服务。

Coyotelistens for incoming connections to the server on a specific TCP port and forwards the request to the Tomcat Engine to process the request and send back a response to the requesting client. Another Coyote Connector, Coyote JK, listens similarly but instead forwards its requests to another web server, such as Apache, using the JK protocol. This usually offers better performance.

Coyote侦听特定 TCP 端口上与服务器的传入连接,并将请求转发到 Tomcat 引擎以处理请求并将响应发送回请求客户端。另一个 Coyote 连接器 Coyote JK 进行类似的侦听,但使用 JK 协议将其请求转发到另一个 Web 服务器,例如 Apache。这通常会提供更好的性能。