gpt4 book ai didi

tomcat - 更改 tomcats 默认 URL

转载 作者:行者123 更新时间:2023-11-28 22:27:35 29 4
gpt4 key购买 nike

我有 2 个正在运行的 tomcat(版本 8)。1 可通过 http://localhost:8080/ 访问.此 tomcat 的所有其他应用程序都可以按预期访问:

第二个 tomcat 可以通过 http://localhost:9090/ 访问. (其他港口)但我需要另一个区别。我想像下面这样更改 URL prePath:

我在 server.xmlcontext.xml 中尝试了很多 Context 元素。但是没有一个能满足我的要求。

我想要一个路径前缀,也为 ROOT 作为 http://localhost:9090/test/ .

我不知道怎么做,所以有人知道一个好的解决方案吗?

最佳答案

一个简单的解决方案是将所有相关应用程序部署到 test 文件夹下。

例如将 tomcat-${version}/webapps/examples 移动到 tomcat-${version}/webapps/test/examples

也可以将ROOT文件夹中的内容复制到新建的test文件夹中,为http://localhost:9090实现同样的ROOT功能/测试

关于tomcat - 更改 tomcats 默认 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36136093/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com