在打包的文件夹里面index.html同一级下新建一个WEP-INF文件夹, 在此文件夹下写一个web.xml
可访问如下详细地址 https://www.cnblogs.com/sllzhj/p/12937129.html
<?xml version=
"1.0"
encoding=
"UTF-8"
?>
<web-app xmlns=
"http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version=
"3.1"
metadata-complete=
"true"
>
<display-name>Router
for
Tomcat</display-name>
<error-page>
<error-code>404</error-code>
<location>/index.html</location>
</error-page>
</web-app>
09-06
570