一个真正的鳗-kun 2022-09-05 18:06 采纳率: 100%
浏览 38
已结题

为什么新创建的.jsp运行显示的是index.jsp的结果啊?

img

img


为什么新创建的.jsp运行显示的是index.jsp的结果啊?

  • 写回答

4条回答 默认 最新

  • 程序yang 全栈领域优质创作者 2022-09-06 11:30
    关注

      tomcat自带的web.xml配置了welcome-file-list节点,该节点的子节点即为默认访问页面(welcome-file),welcome-file配置的顺序会影响到实际的默认访问,我们可以在自己的web.xml文件中配置welcome-file-list节点以覆盖tomcat自带的,tomcat自带的web.xml中配置的welcome-file-list节点如下:

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 11月2日
  • 已采纳回答 10月25日
  • 创建了问题 9月5日