更改Tomcat中配置全局的错误页面
找到tomcat目录下的conf目录下的web.xml文件,添加内容:
<error-page>
<error-code>404</error-code> <!--错误码-->
<location>/index.html</location> <!--相对webapps/ROOT/-->
</error-page>
这种方法比较。。。
查考:
https://blog.csdn.net/a823007573/article/details/85071889
https://blog.csdn.net/honnyee/article/details/81286356