Deploy a Tomcat Application Using the GUI

30 minutes
  • 5 Learning Objectives

About this Hands-on Lab

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.

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. 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 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.

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.war using 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.

Context Path: /sample (note the leading /)

War or directory path: file:/files/version1/sample.war

Deploy.

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 /files/version2/sample.war.

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.

Context Path: /sample
(note the leading /)

Version (for parallel deployment): V2

War or directory path: file:/files/version2/sample.war

Deploy.

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.

Additional Resources

You have been tasked with deploying an application on your Tomcat server. Just after you deployed the application, a new version has been given to you and you need to deploy that one.

Because you want to ensure the new application works properly before undeploying the old version, you wish to deploy it with versioning.

For the updated file, use the versioning number of V2.

You will do this by performing the tasks as mentioned in the tasks list.

A successful hands-on lab will have you able to see the Tomcat application on the server. The new application will be running and the old application will have been undeployed.

Note: It may take 3 to 10 minutes after the hands-on lab has started before you are able to log into the server. This is fine and will not affect the performance of the tasks for the hands-on lab.

Logging In

Use the credentials provided on the hands-on lab overview page, and log in to the provided server as cloud_user. Note that this is for connecting to both the server and the Tomcat GUI.

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?