Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Set Fixed Heap Size in Tomcat

Welcome to this hands-on lab, where we will set Tomcat to use a fixed heap size. This is so that the memory is pre allocated. 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 for you on port **8080**, on the provided server. Once the heap size is set, you should be able to see the changes on the Tomcat Manager GUI page.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 22, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    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, copy the external IP address and paste it in your browser, then append :8080 to it.

    For example, if the 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's GUI on port 8080.

  2. Challenge

    Go to the Tomcat GUI and Check the JVM Memory Settings

    Go to the Tomcat GUI and check the server status page. You should take note of the memory settings that are originally applied to the Tomcat instance.

  3. Challenge

    Change Your Tomcat Server so It Has a Minimum and Maximum Heap Size of 1gb

    The options to add to the Tomcat startup file (you may need to create the file) are these:

    -Xms1g 
    
    -Xmx1g
    

    This should be set in a file under the bin folder called setenv.sh.

    These entries should be exported as CATALINA_OPTS.

  4. Challenge

    Restart the Tomcat Server and Check the JVM Memory

    Go to the Tomcat Manager GUI, then to the Server Status application and check the JVM memory.

    It should reflect the changes you made to the minimum and maximum settings, and be much higher than the original settings.

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

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.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight