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

后端 未结 13 1342
傲寒
傲寒 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-22 00:04

    Tomcat 8 : After many searches this is only working code: in server.xml

    
        
         
             
             WEB-INF/web.xml
         
        
    

    Restart Tomcat, make sure when you access 127.0.0.1:8080, it will display the content in 127.0.0.1:8080/apple

    My project was java web application witch created by netbeans ,I set context path in project configuration, no other thing, even I put apple.war in webapps folder.

提交回复
热议问题