我正在尝试覆盖 tomcat 主页,因为我需要将 index.html 作为主页而不是 index.jsp。
于是我尝试在web.xml中设置如下:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
当我重新启动tomcat时,它仍然进入index.jsp页面。
PS:我用的是Intellij 13,是这样吗?
最佳答案
简短回答:您想要的是“覆盖”默认上下文,您需要将您的 webapp 安装在 webapps 内的“ROOT”目录中。
关于java - 如何覆盖tomcat主页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22445052/