Solve project deployment, access to report 404 problem

Very bizarre question. Describe the error first.

bug description: 

Publish the project to Tomcat,


From the above figure, it can be found that the project does not report an error, and the log4j log is running normally. It means that there is no problem with the project, and then go to the page below.


404, the first impression is that the path is wrong. After checking and eliminating, it is suspected that tomcat has not been compiled. There is no problem in checking the configuration and build path. Finally, deleting tomcat and redeploying will not work.

In order to rule out the problem of tomcat, run other projects, the result is ok. That means it is a configuration problem when the project is published to tomcat. I've been looking for a long time and found the problem here


Solution:

The solution is very simple, clear tomcat, double-click to return to this location, and change the Deploy path to


After the modification, run the project, the effect is as follows


It took a long time to find this bug, and fixing it was a breeze. I have never had this problem playing tomcat before, so I didn't care when someone told me that there might be a problem in this place. To sum up, tomcat is really easy to be broken.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326416458&siteId=291194637