servlet context to tomcat 7 root

后端 未结 3 2038
故里飘歌
故里飘歌 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:26

    Without changing the .war file to ROOT follow below steps:

    1. Create a file named ROOT.xml under the tomcat/conf/Catalina/localhost/

    2. paste below code into the ROOT.xml file:

    
    

    Now you can access your project in tomcat root.

    To have a clean project remove tomcat/webapps/ROOT directory.

提交回复
热议问题