JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
Download and Install Tomcat on CentOS
This section provides a tutorial example on how to install Tomcat server on a local CentOS system. It requires OpenJDK.
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 CentOS local computer.
1. Login as "root" to avoid permission problems.
2. Verify that OpenJDK 8 JRE and JDK packages are installed:
# java -version openjdk version "1.8.0_232" OpenJDK Runtime Environment (build 1.8.0_232-b09) OpenJDK Server VM (build 25.232-b09, mixed mode) # javac -version javac 1.8.0_232
3. Install Tomcat with "yum" package tool. It will download the latest version of the correct binary package automatically.
# yum install tomcat: ... Installed: tomcat.noarch 0:7.0.96-1.el6 Dependency Installed: ecj.i686 1:4.5.2-3.el6 jakarta-commons-daemon.i686 1:1.0.1-8.9.el6 java-1.5.0-gcj.i686 0:1.5.0.0-29.1.el6 java_cup.i686 1:0.10k-5.el6 libgcj.i686 0:4.4.7-23.el6 sinjdoc.i686 0:0.5-9.1.el6 tomcat-el-2.2-api.noarch 0:7.0.96-1.el6 tomcat-jsp-2.2-api.noarch 0:7.0.96-1.el6 tomcat-lib.noarch 0:7.0.96-1.el6 tomcat-servlet-3.0-api.noarch 0:7.0.96-1.el6 Complete!
4. Verify Tomcat installation:
# which tomcat /usr/sbin/tomcat # tomcat version Server version: Apache Tomcat/7.0.96 Server built: Sep 26 2019 18:42:39 UTC Server number: 7.0.96.0 OS Name: Linux OS Version: 2.6.32-696.20.1.el6.i686 Architecture: i386 JVM Version: 1.8.0_232-b09 JVM Vendor: Oracle Corporation
I think my Tomcat 7 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
►Download and Install Tomcat on CentOS
Start/Stop Tomcat Server on CentOS
My First Servlet Page on CentOS
Connecting to SQL Server from Servlet