Configuration 我可以在子文件夹中用欢迎文件设置Tomcat吗?

Configuration 我可以在子文件夹中用欢迎文件设置Tomcat吗?,configuration,tomcat6,web.xml,Configuration,Tomcat6,Web.xml,办公室里有人问了我一个奇怪但有趣的问题 如果我在web.xml中有类似的内容(应用程序文件或容器文件) something.html 这个东西的子文件夹中还有一个页面可以使用,所以我改变了它 <welcome-file-list> <welcome-file>subfolder/something.html</welcome-file> </welcome-file-list> 子文件夹/something.html 第二种选择是否可行?

办公室里有人问了我一个奇怪但有趣的问题

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


something.html
这个东西的子文件夹中还有一个页面可以使用,所以我改变了它

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

子文件夹/something.html

第二种选择是否可行?谢谢

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

是的,可以完成。地址栏显示上下文URL,但不包含欢迎文件指令中指定的子文件夹。但它很好用

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