1. Open the project in web.xml, not pay attention to the tomcat web.xml; generally in the WEB-INF directory of the project, and then add the following statement
<error-page> <error-code>404</error-code> <!--错误码--> <location>/WEB-INF/error/404.jsp</location> <!--相对webapps/ROOT/--> </error-page>
2. The next step is to create a corresponding file in the corresponding path