Download and Install Tomcat on macOS

This section provides a tutorial example on how to install Tomcat server on a local macOS system. It requires JDK.

If you want to learn JSP (JavaServer Page) technology, you should download and install Apache Tomcat on your local machine, so that you can use it test your JSP pages. Here is what I did to download and install Apache Tomcat on my macOS local computer.

1. Verify that OpenJDK 13 JRE and JDK packages are installed:

herong$ java -version
java version "13" 2019-09-17
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)

herong$ javac -version
javac 13

2. Go to Tomcat download Website at

3. Click the "tar.gz" link to download the macOS version.

4. Open and install the downloaded package:

herong$ cd ~/Downloads

herong$ gunzip apache-tomcat-9.0.26.tar.gz

herong$ tar -xf apache-tomcat-9.0.26.tar

herong$ sudo mkdir /Library/Tomcat

herong$ sudo mv apache-tomcat-9.0.26 /Library/Tomcat

5. Verify Tomcat installation:

herong$ /Library/Tomcat/apache-tomcat-9.0.26/bin/

Using CATALINA_BASE:   /Library/Tomcat/apache-tomcat-9.0.26
Using CATALINA_HOME:   /Library/Tomcat/apache-tomcat-9.0.26
Using CATALINA_TMPDIR: /Library/Tomcat/apache-tomcat-9.0.26/temp
Using JRE_HOME:   /Library/Java/JavaVirtualMachines/jdk-13.jdk/Contents/Home
Using CLASSPATH:  /Library/Tomcat/apache-tomcat-9.0.26/bin/bootstrap.jar: \
NOTE: Picked up JDK_JAVA_OPTIONS:  ...
Server version: Apache Tomcat/9.0.26
Server built:   Sep 16 2019 15:51:39 UTC
Server number:
OS Name:        Mac OS X
OS Version:     10.12.6
Architecture:   x86_64
JVM Version:    13+33
JVM Vendor:     Oracle Corporation

I think my Tomcat 9 installation is completed now. See the next tutorial on how to start the Tomcat server properly.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

 JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

 EL (Expression Language)

 Overview of JSTL (JSP Standard Tag Libraries)

 JSTL Core Library

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

 Using Tomcat on CentOS Systems

Using Tomcat on macOS Systems

Download and Install Tomcat on macOS

 Start/Stop Tomcat Server on macOS

 My First HTML Page on macOS

 My First JSP Page on macOS

 My First Servlet Page on macOS

 Connecting to SQL Server from Servlet

 Developing Web Applications with Servlet

 Archived Tutorials


 Full Version in PDF/EPUB