where can I find application specific context.xml file?

送分小仙女□ 提交于 2019-12-06 07:28:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!