【问题标题】:Can I set Tomcat with a welcome-file in a subfolder?我可以在子文件夹中使用欢迎文件设置 Tomcat 吗?
【发布时间】:2011-01-06 21:28:12
【问题描述】:

办公室里有人向我提出了这个奇怪但有趣的问题。

如果我在 web.xml(应用程序文件或容器文件)中有类似的内容

<welcome-file-list>
<welcome-file>something.html</welcome-file>
</welcome-file-list>

并且该东西在子文件夹中有另一个可以使用的页面,所以我更改它...

<welcome-file-list>
<welcome-file>subfolder/something.html</welcome-file>
</welcome-file-list>

¿第二个选项应该有效吗?谢谢!

【问题讨论】:

    标签: configuration tomcat6 web.xml


    【解决方案1】:

    回答自己只是为了让它记录在案。

    是的,可以的。地址栏显示上下文 URL,没有在 welcome-file 指令中指定的子文件夹。但它工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-17
      • 2023-03-15
      • 2013-04-17
      • 2013-05-01
      • 2021-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多