In my $TOMCAT_HOME/conf/server.xml I put this near the bottom:
...
<Context path="/staticdir" docBase="/filesystem/path/to/static/dir"/>
</Host>
</Engine>
</Service>
</Server>
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
But when I start the application in Intellij-IDEA the tomcat log says this:
Using CATALINA_BASE: "C:\Users\me.IntelliJIdea11\system\tomcat\Unnamed_Product_2"
If I go into that directory on my filesystem and look at the conf/server.xml file, it doesn't have the Context
tag I put in there. Why is intellij modifying this and how can I prevent it?
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.
I have found a workaround.
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.
Here's a picture of my tomcat configuration: