Apache Tomcat is an open-source web server and Java Servlet container developed by the Apache Software Foundation. Unlike full Java EE (Enterprise Edition) application servers (like JBoss/WildFly, WebSphere, or WebLogic), Tomcat is a lightweight container implementing only the core Java Web technologies: Java Servlets, JavaServer Pages (JSP), Java Expression Language (EL), and Java WebSockets.
Catalina (Servlet Container):
Catalina is Tomcat’s implementation of the Java Servlet specification. It is the engine that handles web request routing, instantiates servlet objects, manages user sessions, and invokes servlet lifecycle methods (such as init(), service(), and destroy()).
Coyote (HTTP Connector):
Coyote is Tomcat’s HTTP/1.1 connector component. It listens for incoming TCP network requests on a designated port (default 8080), decodes the HTTP protocol streams, wraps them into Java request and response objects, and forwards them to the Catalina engine for processing.
Jasper (JSP Engine):
Jasper is Tomcat’s JSP compiler engine. When a client requests a .jsp page, Jasper dynamically parses the file and compiles it into a Java Servlet class file, which is then compiled into bytecode and executed by the JVM.
This guide details the steps to copy the application ROOT.war archive from the Jump Host, install Tomcat on the application server, change its connector port to 8085 in server.xml, deploy the archive, and verify page delivery.
stapp01)tonyROOT.war (Located at /tmp/ROOT.war on the Jump Host)8085 (configured in /etc/tomcat/server.xml)/usr/share/tomcat/webapps/From the Jump Host, copy the ROOT.war package to the target server’s temporary storage directory using scp:
scp /tmp/ROOT.war tony@stapp01:/tmp/
SSH into App Server 1 from the Jump Host:
ssh tony@stapp01
Install Tomcat along with its administrative web apps and helper tools using the yum package manager:
sudo yum install -y tomcat tomcat-webapps tomcat-admin-webapps
Open the primary Tomcat configuration file (server.xml):
sudo vi /etc/tomcat/server.xml
Locate the connector configuration block (usually searching for port 8080). Modify the port attribute value to 8085:
<Connector port="8085" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Save and exit the file (in vi, press Esc, type :wq, and press Enter).
Copy the ROOT.war file from /tmp/ to the Tomcat webapps/ deployment directory. In a standard CentOS installation, Tomcat automatically extracts (deploys) .war files placed in this folder.
webapps:
sudo rm -rf /usr/share/tomcat/webapps/ROOT
sudo cp /tmp/ROOT.war /usr/share/tomcat/webapps/
tomcat service user can read and modify the files:
sudo chown tomcat:tomcat /usr/share/tomcat/webapps/ROOT.war
Configure the Tomcat systemd service to start automatically during system boot and run it in the current session:
# Start and enable the service
sudo systemctl enable --now tomcat
Check the service status to verify that it is running successfully:
sudo systemctl status tomcat
Verify that the Java process is listening on the newly configured port 8085:
sudo ss -tulpn | grep :8085
Expected output:
tcp LISTEN 0 100 [::]:8085 [::]:* users:(("java",pid=12345,fd=43))
Run a local HTTP query using curl to confirm the application responds correctly on port 8085:
curl -I http://localhost:8085
Expected HTTP response header snippet:
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Log out of the Application Server to return to the Jump Host:
exit