![](/img/trans.png)
[英]Intellij web application on tomcat server shows http://localhost:8080/index.jsp instead of http://localhost:8080/myapp/index.jsp
[英]How to route traffic from localhost:8080 to localhost:8080/myapp
我在tomcat / webapps目录中有多个应用程序并且都在运行,可以使用下面的url访问它们:
我想只更改myapp1的重定向。 就像我把url localhost:8080它应该重定向到localhost:8080 / myapp1只。
但是,如果我把url localhost:8080 / myapp2,那么它应该调用myapp2 。
请帮我解决这个问题,我是这个领域的新手,目前正在使用Ubuntu16.04和tomcat8。
提前致谢。
您需要在server.xml中更改以下标记
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
到下面
<Host name="localhost" appBase="webapps/myapp1"
unpackWARs="true" autoDeploy="true">
有关配置的更多信息,您可以从以下URL中学习[ https://www.udemy.com/apache-tomcat-for-beginners-and-advanced/?couponCode=TCSTACKPROMO]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.