Today, when I was configuring Tomcat to access the project homepage, I found that it reported a 404 error. At first, I thought there was a problem with my project xml configuration. As a result, I adjusted it for a long time and it was still wrong. Later, I found that accessing localhost:8080 also reported a 404 error. This problem was serious, so I started a long debugging and finally succeeded! Record the final solution so that you can refer to it when you encounter similar problems in the future. After consulting with the experts in the JAVA group, I checked the webapps folder in the Tomcat folder and found that my project was not in it, but I did deploy the project in it, so I checked my Tomcat server page and found that the Tomcat path in it was wrong. It was the default path in eclipse, so the deployment of Tomcat failed: The incorrect path configuration is as follows: The correct configuration should be: But after I did this, I ran Tomcat again and found that it couldn't start up and reported an error that the file path could not be found ! Then I decided to change my idea. First, I did not use eclipse to start the Tomcat service. I used Tomcat8.0's startup.bat to start it. I found that an access denied error was reported during the startup process. I thought there was a problem with the access permissions . So I checked Baidu and found that it was indeed the case. So I gave Users full control permissions in Tomcat installation folder->Properties->Security , saved it, and ran startup.bat again. It started smoothly. Then I went back and ran Tomcat again. This time there was no error and Tomcat started successfully! Visit localhost:8080 again, the page is displayed successfully! Then visit my project page, also successfully accessed! So far this problem has been successfully solved ! Summarize:Through this problem, I know that the problem may lie in many aspects, and I should think divergently to solve the problem. This time I spent a long time just checking the access address, and then looking for various errors in Tomcat's configuration file. I didn't expect that there would be problems with Tomcat's path and permissions. I should pay more attention to it in the future! This is the end of this article about how to solve the problem of Tomcat reporting 404 when accessing localhost normally. For more information about Tomcat reporting 404 when accessing localhost normally, 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:
|
<<: User needs lead to marketing-oriented design
>>: Comparison of 5 CSS scrolling ceiling implementation methods (performance upgrade version)
mysql basic data types Overview of common MySQL d...
About let to avoid problems caused by closure Use...
1. Installation and use First, install it in your...
Overview of MySQL MySQL is a relational database ...
This article uses examples to explain the concept...
apache: create virtual host based on port Take cr...
URL rewriting helps determine the preferred domai...
After installing VMware and creating a new virtua...
ant-design-vue customizes the use of Ali iconfont...
<br />In the entire product design process, ...
How to use the MySQL authorization command grant:...
1. Import echart in HTML file <!-- Import echa...
There are many reasons why an application is as s...
Recently, several data anomalies have occurred in...
download MySQL official download, select Windows ...