Welcome to this hands-on lab, where we’ll deploy an application on Tomcat via the CLI in a dynamic manner.
We are using Apache’s Tomcat, a Java-based application platform built around deploying and managing Java Web Applications. The server provided in this lab environment is running Red Hat Enterprise 8 and has Tomcat 9 pre-installed for you. The Tomcat instance is available on port **8080**.
You will log into the server via the CLI and deploy an application. You will then test whether the application automatically deployed by going to the application’s web page.
Next you will deploy a second version of the application, which should also deploy automatically. You will test that by going to the application’s web page, which should show the new version of the application.
Both of the applications will be provided in a folder on the Tomcat server for your use.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Test to Ensure You Can Access the Preconfigured Tomcat Instances on Port 8080
Use the Tomcat server’s public IP address and port 8080 to connect to the Tomcat GUI and log in. The username and password to use are the same as what’s provided for CLI access.
To access the server, visit the external IP address provided in the hands-on lab page, and append :8080 to it.
For example, if an IP address shown was 3.92.152.3, then you would put the following into your web browser:
http://3.92.152.3:8080
You should see the GUI. This is to test that the Tomcat is up and running and the lab is ready for you to perform the tasks.
Note: It may take from 3 to 10 mins after the Hands-On Lab has started before you can access the Tomcat servers on Port 8080.
- Deploy Version 1 of the sample.war via the CLI
You must deploy
/files/version1/sample.war
via the CLI, not the GUI.Once the application is in the correct place, check to make sure it is deployed. Check to see if the application has been exploded in the folder.
Go to the application via a browser and make sure it is working. It can be found by visiting the server’s external IP address with :8080/sample appended to the URL.
For example, if the IP address shown for the lab was 3.92.152.3 then you would put the following into your web browser:
http://3.92.152.3:8080/sample- Deploy Version 2 of the sample.war via the CLI
You must deploy Version 2 of the application (located in
/files/version2/sample.war
) via the CLI, not the GUI.Once the application is in the correct place, check to make sure it deployed.
Go to the application via a browser and make sure it is working. It can be found by going to the server’s external IP address with :8080/sample appended to the URL.
For example, if the IP address shown for the lab was 3.92.152.3 then you would put the following into your web browser:
http://3.92.152.3:8080/sampleYou should see text on the webpage showing that it is Version 2. If the webpage is unchanged, troubleshoot the issue.