- A Cloud Guru
Deploy a Tomcat Application Using the GUI
Welcome to this hands-on lab, where we'll deploy an application on Tomcat. 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 preinstalled for you. The Tomcat instance is available on port **8080**. You will log into the server and deploy an application via the web GUI. You will then deploy a second version of the application, making use of the versioning available to you on the Tomcat GUI deployment section. You will test to make sure the new version of the application is working. After that, you will remove the old original application. Ensure the newer version of the application is still working.
Table of Contents
Test to Ensure You Can Access the Preconfigured Tomcat Instances on Port 8080
Use the Tomcat server's Public IP Address and port 8080. 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, copy the external IP address and test in your browser by using this ip Address and appending the :8080 to it.
For example, if an IP address shown was 22.214.171.124, then you would put the following into your web browser:
You should see the GUI.
Note: It may take from 3 to 10 mins after the hands-on lab has started before you can access the Tomcat server on Port 8080.
Deploy sample.war File, Located in /files/version1/, via the Manager GUI
Log into the server's GUI, and deploy
/files/version1/sample.warusing the Manager.
The file is located on the server. You will need to use the deploy section of the manager app from the server's Tomcat GUI.
/sample(note the leading
War or directory path:
See it deployed.
Test, show the page is working by going to the sample application.
Deploy Version 2 of the sample.war, Located in /files/version2/, via the GUI
Using the server's GUI and using the Manager, deploy
The file is located on the server. You will need to use the deploy section of the manager app from the server's Tomcat GUI. You should mark this as V2 in version.
(note the leading
Version (for parallel deployment): V2
War or directory path:
You should be able to see it in the Applications section of the GUI. It should have the version number associated with it.
Test that version 2 of the application is shown.
Test the application is working by going to the sample web page.
You should see text on the webpage showing it is Version 2.
NOTE: You may have to refresh your browsers web page for it to show the new version. It may be cached by your browser.
Undeploy the Original Version of the Sample Application
Using the Manager GUI, you should be able to undeploy the original sample application.
Undeploying it should not affect being able to access the new version of the application.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.