在html页面的head标签中写如下代码: <head> <meta http-equiv="refresh" content="5;url='${contextPath}/index.html'"> </head>