您可以在Tomcat server.xml中进行设置。
<Context>在
<Host>下面的类似图中添加一个元素,将您设置
examples-resteasy-2.1-SNAPSHOT为默认Web应用程序。
<Context docbase="examples-resteasy-2.1-SNAPSHOT" path="" reloadable="true" />
这应该允许您以http:// localhost:8080 / contacts访问它
将路径设置为“ myservice”,如下所示
<Context docbase="examples-resteasy-2.1-SNAPSHOT" path="/myservice" reloadable="true" />
应该允许您以http:// localhost:8080 / myservice / contacts访问它



