title: Why does Intellij-IDEA ignore my tomcat/conf/server.xml Context tag?
body: <p>In my $TOMCAT_HOME/conf/server.xml I put this near the bottom:</p>
  
  <pre><code>...
  
   &lt;Context path="/staticdir" docBase="/filesystem/path/to/static/dir"/&gt;                                
  
        &lt;/Host&gt;
      &lt;/Engine&gt;
    &lt;/Service&gt;
  &lt;/Server&gt;
  </code></pre>
  
  <p>I'm doing this because I have files on my filesystem that I want tomcat to serve up when you go to localhost:8080/staticdir</p>
  
  <p>But when I start the application in Intellij-IDEA the tomcat log says this:</p>
  
  <blockquote>
    <p>Using CATALINA_BASE:   "C:\Users\me.IntelliJIdea11\system\tomcat\Unnamed_Product_2"</p>
  </blockquote>
  
  <p>If I go into that directory on my filesystem and look at the conf/server.xml file, it doesn't have the <code>Context</code> tag I put in there.  Why is intellij modifying this and how can I prevent it?</p>
  
  <p>I have a feeling I should have made this change to my $TOMCAT_HOME/conf/context.xml file instead, but I'm having trouble finding examples of how to make this change in there.  If someone could show me an example of that, I'd consider it an answer, because I notice that intellij doesn't modify that file.</p>
  
  <hr>
  
  <p>I have found a workaround. </p>
  
  <p><a href="https://i.stack.imgur.com/vKdfE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vKdfE.png" alt="enter image description here"></a></p>
  
  <p>But I really don't like this because when new users try to run the app for the first time, I can't imagine a way to detect they did this step incorrectly.  </p>
  
  <p>Here's a picture of my tomcat configuration:</p>
  
  <p><a href="https://i.stack.imgur.com/FOiZX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FOiZX.png" alt="enter image description here"></a></p>