Scenario: When starting tomcat in docker (version 8.5.50 downloaded from Alibaba Cloud), a 404 error occurred when accessing the tomcat homepage. I searched for many tutorials online but could not find a solution. Finally, I found the problem in the video explanation (I don't know if it was the problem with the version I downloaded) Specific situation: Use the command: docker exec -it to run the tomcat container ID /bin/bash to enter the tomcat directory Enter the webapps folder and find that it is empty (the default welcome page of tomcat should actually be placed in the path: webapps/ROOT/index.jsp or index.html) I found that there was a webapps.dist file next to it. When I entered it, I found that all the files that should have been in the webapps file were in the webapps.dist file. Now I don’t know why! ! ! picture: Rename webapps.dist to webapps. The original webapps (empty file) can be deleted or renamed to another name: mv webapps.dist webapps Note: If it is on the server, remember to open the mapped host port, otherwise it will not be accessible. This is the end of this article about the 404 error when accessing the homepage when starting tomcat with Docker. For more related content about 404 error when starting tomcat with Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: XHTML Tutorial: XHTML Basics for Beginners
>>: Detailed Example of MySQL InnoDB Locking Mechanism
Preface Every time you use Docker to start a Hado...
1 Problem Description This article sorts the esta...
Preface Docker has been very popular in the past ...
I encountered a small problem today and struggled ...
Table of contents 1. Use in components 2. Option ...
Environment configuration 1: Install MySQL and ad...
The MySQL version used in this example is mysql-8...
Preface In JavaScript, you need to use document.q...
Overview Indexing is a skill that must be mastere...
1 Download and start Tomcat Go to the official we...
<body> <div id="root"> <...
<meta name="viewport" content="...
Let's learn about different types of loops th...
Table partitioning is different from database par...
1. Download the installation script - composer-se...