Deploying my application at the root in Tomcat

后端 未结 10 1955
说谎
说谎 2020-11-22 06:25

I have the war file of my application. I need to deploy this at the root level. The current URL is http://localhost:8080/war_name/application_name.

10条回答
  •  爱一瞬间的悲伤
    2020-11-22 07:19

    You have a couple of options:

    1. Remove the out-of-the-box ROOT/ directory from tomcat and rename your war file to ROOT.war before deploying it.

    2. Deploy your war as (from your example) war_name.war and configure the context root in conf/server.xml to use your war file :

      
      

    The first one is easier, but a little more kludgy. The second one is probably the more elegant way to do it.

提交回复
热议问题