JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
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 https://tomcat.apache.org/download-90.cgi.
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/version.sh 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: \ /Library/Tomcat/apache-tomcat-9.0.26/bin/tomcat-juli.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: 9.0.26.0 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
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
►Using Tomcat on macOS Systems
►Download and Install Tomcat on macOS
Start/Stop Tomcat Server on macOS
My First Servlet Page on macOS
Connecting to SQL Server from Servlet