Tomcat is started normally 404 exception is reported on all pages 404 exception summary analysis

  • 2020-04-01 02:11:21
  • OfStack

404 exceptions, which are common, are mostly path errors, web.xml file mapping paths miswritten, server Settings, servlet jars not exported or not published with the project, and so on.

If the path is wrong, double check to resolve the problem.

If the server is not set up well, the error will be reported. This is generally a problem encountered by the novice at the beginning of the course, which is to set the tomcat server location in eclipse to use tomcat installation. Double-click the tomcat server in the eclipse interface, see the following Settings:

< img Alt = "" border = 0 SRC =" / / files.jb51.net/file_images/article/201307/201307150941286.jpg "width = 846 height = 458 >

If it is a jar problem for the servlet, introduce the jar by building path, add the external jar file in the libraries TAB, check the application in the order and export TAB, and finally add it in the deployment and assessment option to indicate that tomcat will be copied to the web-inf \lib directory under the project when it is released.

But today I encountered the problem is not any of them, think I did not move anything, just modify the code, want to use another way to achieve the upload function, but the introduction of a jar and delete after the 404 problem, very helpless.

The problem came out to be solved. After a lot of hard work, I finally found the problem: when deleting the jar, I accidentally removed the webapp contained in the release. No wonder the newspaper could not find the path, as shown in the figure

< img Alt = "" border = 0 SRC =" / / files.jb51.net/file_images/article/201307/201307150941287.jpg ">

All right, problem solved.
Note: you also need to clean up tomcat and restart it, or an exception will still be reported


Related articles: