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

Piyush Ghediya picture Piyush Ghediya · Oct 7, 2015 · Viewed 33k times · Source

Can anyone describe

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

  • What is Coyote?

  • What is Catalina?

Answer

a3.14_Infinity picture a3.14_Infinity · Oct 7, 2015

Catalina is 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

Coyote is 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 listens 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.