Apache Tomcat Tutorial
Apache Tomcat Tutorial
Welcome to Apache Tomcat Tutorial. Learn to use Apache Tomcat as a JSP container, HTTP Web Server,
etc., and understand configuration for security and scalability with examples.
The Apache Tomcat software is an open source implementation of the Java Servlet, JavaServer Pages, Java
Expression Language and Java WebSocket technologies.
Apache Tomcat is usually used as a Servlet Container even though Tomcat has a fully functional HTTP Server
to serve static content. In most of production, Tomcat is used in conjunction with Apache HTTP Server where
Apache HTTP Server attends static content like html, images etc., and forwards the requests for dynamic
content to Tomcat. This is because Apache HTTP Server supports more advanced options than that of Tomcat.
Latest Apache Tomcat version 8.5 adds support for HTTP/2, OpenSSL for JSSE, TLS virtual hosting and
JASPIC 1.1
Components and Features of Apache Tomcat
Apache Tomcat has following components and features to manage web applications.
Catalina
Coyote
Jasper
Cluster
High Availability
Web Application
Jasper 2
Jasper is the JSP Engine for Tomcat. Jasper is responsible for parsing JSP files and compilation of JSP’s
Java code as servlets.
Jasper is capable of background compilation, which means if any changes are made to JSP files, then the
older versions of those JSP files are still retained by the server, until the updated JSP files are recompiled.
Catalina
Catalina is Tomcat’s servlet container. Catalina makes Tomcat a Web Server for dynamic content.
Coyote
Coyote is the component that makes Tomcat capable as a HTTP Web Server. Coyote makes Catalina also act
as a server that serves static content.
To install Tomcat on Ubuntu, you could use command line interface and run the following command :
If you would like to install tomcat7 for some project related reasons, use tomcat7 instead of tomcat8 in the
command.
Following are the useful locations that we may need in furthur steps :
You could check if the Tomcat server is running, by opening a browser and hitting the url
http://localhost:8080/.. Something similar to the following would be responded back with.
In case if you have stopped it manually, and would like to start Apache Tomcat again, open a terminal and run
the following command.
If you have installed tomat7, use tomcat7 instead of tomcat8 in the above command.
In the following sections, we shall learn to deploy static and web applications in tomcat.
For Linux :
Conclusion
With these series of tutorials, we have learnt how to configure and work with Apache Tomcat.