0
votes

Deploy WAR files in Tomcat Manually

There are lots of examples on how to deploying war files in Tomcat on the internet but it only shows how to deploy the war files in the root directory. What if I want to have a sub directory call "myfolder" where my application resides. So my URL: https://localhost:8080/myfolder/index.html. Do I need to create a folder in webapps call "myfolder" and deploy my war files there?

<TOMCAT>/webapps/myfolder/

Do I need to modify the context.xml file so Tomcat will know where to look? There are two context.xml files. How do I know which one to pick??

1) <TOMCAT>/ROOT/META-INF/context.xml
2) <TOMCAT>/conf/context.xml

tks

1
myfolder is the name of your context application? Or does not your application context have a name? Which IDE are you using to build your application?JUAN CALVOPINA M

1 Answers

0
votes

You should deploy myfolder.war under /webapps/. Tomcat picks up /myfolder/META-INF/context.xml for your application.

  • /conf/context.xml : settings for all applications
  • /myfolder/META-INF/context.xml : settings for your application