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

后端 未结 13 1344
傲寒
傲寒 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:02

    The below trick worked for me.

    1) Comment/delete the below configuration from server.xml file (inside conf folder) of tomcat.

    2) Delete the existing ROOT folder (If any) residing inside tomcat webapps folder. And rename your war (e.g: test.war ) file to ROOT.war.

    Remember that while renaming war file to ROOT.war "ROOT" should be in caps.

    Limitation: You can deploy only one application inside one tomcat instance.

提交回复
热议问题