IntelliJ IDEA
 
Get IntelliJ IDEA

Deploy and debug a Java web application inside a container running Tomcat

Last modified: 15 July 2024

You can use a Docker container to run an application server for deploying and debugging your Java web application. This is a great way to test and debug web applications on various versions of the application server that reproduce various environments.

This tutorial describes how to use a Docker Compose file to run a Docker container with the web application deployed to the Tomcat application server and all necessary configuration for debugging: exposing the debugger port, bind mounting the output directory with the WAR file to Tomcat in the container, and opening the debugger socket.