2

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?

2
  • Have you checked logs? docker logs beautiful_swartz Commented Sep 13, 2024 at 14:40
  • 3
    Please edit the question to include a minimal reproducible example. Details like your Dockerfile and the actual docker run command will be more interesting than after-the-fact diatnostic output. Commented Sep 13, 2024 at 15:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.