user733230
user733230

Reputation:

Which context.xml is used First

On my Tomcat 6.0.x I have a context.xml file in the conf directory and I also have a context.xml in the META-INF directory of a project deployed from netbeans6.9.1.

The context.xml contains the details of database to be connected...

Which among the two will be used by the application to connect to the database

Upvotes: 4

Views: 403

Answers (1)

skaffman
skaffman

Reputation: 403581

My understanding is that tomcat/conf/context.xml defines a set of "global", statically-configured contexts. Any WAR deployed with its own context.xml will be configured using that, rather than any of the contexts defined in the global one.

Upvotes: 2

Related Questions