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
The following situations were discovered during d...
1. Background We do some internal training from t...
Today is still a case of Watch app design. I love...
Install postcss-pxtorem first: npm install postcs...
This article refers to the work of 51CTO blog aut...
Table of contents Install Redis on Docker 1. Find...
1. Introduction Some time ago, there were a serie...
Vue version, copy it to the file and use it <t...
Table of contents First step installation Step 2:...
Preface In daily work or study, it is inevitable ...
This article introduces an example of how CSS3 ca...
Table of contents What is the Observer Pattern? S...
1. Introduction to nmon Nmon (Nigel's Monitor...
Table of contents 1. Preparation: 2. Source code ...
1. Purpose: Make the code easier to maintain and ...