问题
I read that context.xml
file (in Tomcat) is application specific. I have created two web projects from my netbeans IDE with Tomcat as the server.But I unable to find the application specific context.xml
files. I have only found the context.xml
inside the conf directory of Tomcat.

Where can I find the application specific context.xml
files ?
回答1:
I noticed the link in the other answer is for the wrong version of Tomcat. Here is the correct documentation:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context
As you can see the options are different now from previous versions. In my experience the most common is options 1:
In an individual file at /META-INF/context.xml inside the application files.
回答2:
Based on my experience and what i see from the documentation:
Context elements may be explicitly defined:
- In the $CATALINA_BASE/conf/context.xml file: the Context element information will be loaded by all webapps.
- In the $CATALINA_BASE/conf/[enginename]/[hostname]/context.xml.default file: the Context element information will be loaded by all webapps of that host.
Taken from here
来源:https://stackoverflow.com/questions/11561961/where-can-i-find-application-specific-context-xml-file