title: How to set up tomcat context path for web application? .war file name is coming infront of the application name in the url
body: <p>I am having a trouble getting my web application 'xyz' running in tomcat 7 server hosted in DigitalOcean servers at:</p>
  
  <p><a href="http://myDomain:8080/myWebApp" rel="noreferrer">http://myDomain:8080/myWebApp</a></p>
  
  <p>The name of my .war file is ".MyWebApp".</p>
  
  <p>after deploying the .war file in tomcat, the application starts at:</p>
  
  <p><a href="http://myDomain:8080/MyWebApp/myWebApp" rel="noreferrer">http://myDomain:8080/MyWebApp/myWebApp</a></p>
  
  <p>any idea how to remove this "MyWebApp" part from the URL?</p>
  
  <p>I have seen some of the solutions for this problem, they are mostly solutions of running the application in localhost. They suggested to change the 'context.xml' file which I already did like this:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;Context&gt;
  
      &lt;!-- Default set of monitored resources --&gt;
      &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
      &lt;WatchedResource&gt;${catalina.base}/conf/web.xml&lt;/WatchedResource&gt;
  
       path="" docBase="MyWebApp" debug="0" reloadable="true"
  &lt;/Context&gt;
  </code></pre>
  
  <p>Any help would be very much appreciated!</p>
  
  <p>Do not mark this as duplicate. I have checked all the solutions which worked for me in localhost, but not in digital ocean VPS. I think I am pretty specific here.</p>
  
  <p>Thank you in advance!</p>