我有2个运行tomcats(版本8)。 1可通过http://localhost:8080/联系。更改tomcats默认URL
- http://localhost:8080/manager(雄猫经理APP)
- http://localhost:8080/myApp
- http://localhost:8080/docs(Tomcatdocumentation)
- http://localhost:8080/examples(雄猫JSP示例)
通过http://localhost:9090/可以访问第二个tomcat。 (其他港口) 但我需要一个其他的区别。我想改变URL prePath类似如下:
- http://localhost:9090/test/manager(雄猫经理APP)
- http://localhost:9090/test/myApp
- http://localhost:9090/test/docs(Tomcatdocumentation)
- http://localhost:9090/test/examples(雄猫JSP示例)
我尝试了Context
元素在server.xml
和context.xml
中很多。但没有任何符合我的要求。
我想有一个路径前缀,也为ROOT的路径前缀为http://localhost:9090/test/。
我不知道如何做,所以有人知道一个很好的解决方案吗?
#boo_radley谢谢。我试过你的解决方案。它适用于所有人,但不适用于webapps中的tomcats manager目录。 –