404 write a corresponding error.html file, and then put the file into tomcat ROOT project, and then configure tomcat / conf / web.xml file
add the following code
<error-page>
<error-code>404</error-code>
<location>/error.html</location>
</error-page>