From the course: Learning Apache Tomcat

What is Tomcat? - Tomcat Tutorial

From the course: Learning Apache Tomcat

Start my 1-month free trial

What is Tomcat?

- [Instructor] Tomcat is a lightweight and robust application server for Java. It's free and open source, written in Java, and designed for hosting Java applications. Tomcat has been around for a long time, over 20 years. It's widely used in production for a wide range of applications including non-Java applications written in languages that use the Java Virtual Machine, like JRuby and Closure. The primary way Tomcat interacts with the underlying system is through something called a servlet. Simply put, a servlet is a bit of compiled Java code that's been set up to interface with Tomcat. A servlet can do just about anything a Java application can do like interact with the database and it doesn't need to understand HTTP, URLs, et cetera. All of that is handled by Tomcat. Tomcat itself is made up of three main component parts, Catalina, Jasper, and Coyote. We won't exactly be interacting with these components individually, but you'll see the names from time to time in log files and error messages. Catalina is one of the most important. Catalina is the piece that handles the interface between servlets and the rest of Tomcat. It handles URLs routing to different servlets. Jasper is the component that compiles JSP files, or Java Server Pages, into servlets. JSP is kind of the Java equivalent of PHP or ASP. JSP lets you create HTML content that incorporates some Java. For example, iterating through a list of names to generate lines in a table. It's built to be a bit more user friendly that writing pure Java servlets when generating HTML content. The other major piece is Coyote. This is the part of Tomcat that handles the actual HTTP communication and lets the rest of the system act like a regular web server serving static files.

Contents