How to deploy apps in tomcat server

后端 未结 3 737
情话喂你
情话喂你 2021-01-06 00:56

I want to deploy myapp in tomcat server. I know one way is to delete the Root folder from webapps and rename my app.war as ROOT.WAR. But i do not want to do this. I want to

3条回答
  •  盖世英雄少女心
    2021-01-06 01:45

    You have several options to set a root application. (see https://stackoverflow.com/a/5328636/6371459)

    1. Remove ROOT directory and deploy your war as ROOT.war

    2. Deploy your war in webapps and configure the context root in conf/server.xml to use your war file (not recommended because requires restarting)

    3. Create a specific context file $CATALINA_BASE/conf/[enginename]/[hostname]/ROOT.xml and set docBase=your_war_name like previous 2) (see @ChristopherShultz answer)

    Since you have discarded option 1, and option 2 is not recommended, I suggest use a context file

提交回复
热议问题