我可以在子文件夹中设置一个欢迎文件的Tomcat吗?

编程入门 行业动态 更新时间:2024-10-28 16:24:24
本文介绍了我可以在子文件夹中设置一个欢迎文件的Tomcat吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人在办公室给我这个奇怪但有趣的问题。

Someone at the office threw me this weird-yet-interesting question.

如果我在web.xml(应用程序文件或容器文件)中有这样的东西

If I have something like this in a web.xml (either app' file or container's file)

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

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

and the thing has another page in a subfolder that can be used so I change it...

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

如果第二个选项工作?谢谢!

¿Should the second option work? Thanks!

推荐答案

回答自己只是为了记录。

Answering to myself just to let it in the record.

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

Yes, it can be done. The address bar shows the context URL without the subfolder specified in the welcome-file directive. But it works fine.

更多推荐

我可以在子文件夹中设置一个欢迎文件的Tomcat吗?

本文发布于:2023-11-14 16:50:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588005.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   夹中   Tomcat

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!