changing app root for spring mvc app on tomcat

前端 未结 1 362
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 17:46

I am working with a sample RESTEasy 2.0 resource on Spring MVC 3.0 and deplying to Tomcat 6. I can get to my resource through http: //localhost:8080/examples-resteasy-2.1-SN

1条回答
  •  悲哀的现实
    2020-12-30 18:47

    You can set these in your Tomcat server.xml.

    Add a element within the like below which sets your examples-resteasy-2.1-SNAPSHOT as the default web app.

    
    

    This should allow you to access it as http: //localhost:8080/contacts

    Set the path to "myservice" like below

    
    

    should allow you to access it as http: //localhost:8080/myservice/contacts

    0 讨论(0)
提交回复
热议问题