I am running a TomEE server inside a Docker container, but my web application is not loading as expected. Here is the setup I'm using:
Docker Image and Container:
Image: interesting_picture:latest (created 4 minutes ago) Container Name: beautiful_swartz Port Mapping: 0.0.0.0:8080->8080/tcp
Tomcat Directory Structure: Inside the container, I navigated to the /usr/local/tomcat/webapps/ROOT/ directory, which contains the following files: index.jsp META-INF prompt.jsp result.jsp WEB-INF
Docker Folder Structure: ->Dockerfile and ->ROOT.war of my application
Problem: When I access http://localhost:8080 in my browser, it just shows an HTTP Status 404 – Not Found Type Status Report Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/11.0.0-M24
What I Have Tried: 1)Checked that the container is running and the port is correctly mapped. 2)Verified that the files are in the /usr/local/tomcat/webapps/ROOT/ directory. 3)Restarted the Docker container.
Additional Information:
Docker version: Docker version 27.1.1, build 6312585 TomEE version: TomeEE 10.1.25 Host OS: macOS Ventura 13.3.1 (22E261)
Why is my Tomcat web application not loading correctly, and how can I ensure that my custom JSP files are served by Tomcat in the Docker container?
docker logs beautiful_swartzDockerfileand the actualdocker runcommand will be more interesting than after-the-fact diatnostic output.