How to set the context path of a web application in Tomcat 7.0

后端 未结 13 1367
傲寒
傲寒 2020-11-21 23:34

I know that I can rename my webapp (or it\'s WAR file) to ROOT but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc & it says

13条回答
  •  青春惊慌失措
    2020-11-21 23:53

    Simplest and flexible solution is below: Inside ${Tomcat_home}/config/server.xml

    Change the autoDeploy="false" deployOnStartup="false" under Host element like below This is must.

    
    

    Add below line under Host element.

    
                WEB-INF/web.xml
            
    

    With the above approach we can add as many applications under webapps with different context path names.

提交回复
热议问题