我使用的Eclipse J2EE项目... 一个设备发送请求到我的身边和URL像与Tomcat的URL的问题包括:项目名称
http://myIP:myPort/corporationweb/Controller
/corporationweb/Controller
是固定的,我们不能改变它,因为它使在设备
在Eclipse中我的项目名称是“VirtualTest
”,但这里的tomcat包括项目名称,如果我映射任何servlet,/corporationweb/Controller
URL像
http://localhost:8080/VirtualTest/corporationweb/Controller
我需要打开的页面没有改变项目名称
- 任何我所能映射的servlet直接使URL像
http://localhost:8080/corporationweb/Controller
- 任何URL重写技术..
- 使作为默认应用程序为我的项目
可能的重复:http://stackoverflow.com/questions/2437465/java-how-to-change-context-root-of-a-dynamic-web-project-in-eclipse – nsof 2015-01-09 12:24:59