tomcat中的conf/web.xml里面
<welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

如果客户端访问的URL指向的是一个目录,而不是一个文件名,那么tomcat会按照<welcome-file-list>指定的默认网页的顺序,依次在该目录中查找,将最先找到的文件发送给浏览器,并停止查找后面的网页文件.

WEB-INF中的web.xml文件
<web-app>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

将覆盖上面的设置而不是对它增加
评论
发表评论

您还没有登录,请登录后发表评论

laiseeme
搜索本博客
最近加入圈子
存档
最新评论