servlet context to tomcat 7 root

后端 未结 3 2094
故里飘歌
故里飘歌 2021-01-13 23:56

Whats the best approach to place servlet context to tomcat 7 root? I have tried this post here but didn\'t work for me; i\'m using Apache Tomcat/7.0.42

3条回答
  •  梦谈多话
    2021-01-14 00:21

    In your Tomcat's conf/server.xml file, you'll typically have an entry

    
    

    for your application.

    Change the path to /

    
    

    Add this in the Host entry. For example

    
    
        
    
    
    

    where the docBase attribute is the name of your app as it appears in the webapps folder. The docs explain the meaning of each attribute.

提交回复
热议问题