开发者

Can I set Tomcat with a welcome-file in a subfolder?

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

If I have something like this in a w开发者_JAVA技巧eb.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.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜