Zahir0604
Zahir0604

Reputation: 1

Remote deploy to Tomcat other than default webapps directory

Hi i am trying to deploy my war to Tomcat via shell script.

by default it is deploying to webapps folder, but i need to deploy to a different webapps folder eg: webapps_mydirectory.

i have modified server.xml to

  <Host name="localhost"  appBase="webapps_mydirectory"
        unpackWARs="true" autoDeploy="true">

  </Host>

directly copying war works, but not able to deploy remotely to webapps_mydirectory folder. i do know if webapps_mydirectory should have it own manager app. please help.

Upvotes: 0

Views: 476

Answers (1)

Lozitsky
Lozitsky

Reputation: 183

There are different ways to create a custom folder for apps. But it is recommended to create a configuration file into the conf folder for some application, for example $BASE_TOMCAT_FOLDER/conf/Catalina/localhost/some.xml with the following entry:

<Context docBase="/path/to/webapps_mydirectory"/>

Where some is the name of the application,$BASE_TOMCAT_FOLDER is the path where Tomcat is located, and /path/to/ is the path to the webapps_mydirectory folder. After creating this file, you need to restart the Tomcat service.

Upvotes: 0

Related Questions