Chuck,
Thank you for your feedback. I'll reply in order.
1) I believe it is being ignored because it doesn't see the database
connection when it is in the META-INF/context.xml. It does see them
when I copy the configurations to the other files. What I read and
understand is the META-INF/context.xml file is used only when the
application is deployed via a WAR file. Have I missed something?
2) Yes, I did remove the default Tomcat applications. This is the only
app I have.
3) Yea, I want to avoid editing the global config. That is why I was
hoping the META-INF method would work. I guess I will stay with placing
the configurations in the ROOT.XML.
-JA-
On 4/30/2013 1:16 PM, Caldarale, Charles R wrote:
From: Jason Aleski [mailto:jason.ale...@gmail.com]
Subject: context.xml vs ROOT.xml
I've got my configurations stored in the META-INF/context.xml
file, but because I'm not deploying my application as a WAR,
the context.xml is ignored.
Why do you think it's ignored?
I can copy my application's context.xml and place it in the
tomcat/conf/context.xml and it works.
And is exposed to _all_ of your webapps, since conf/context.xml is implicitly
included in every webapp.
I can also place the database connection in the
tomcat/conf/Catalina/localhost/ROOT.xml and it works.
Which is where it belongs, when it's supposed to apply to the default webapp
only.
If I'm only running one application, does it really matter?
Are you really running only one application? Have you actually removed all of
the others that come with Tomcat, including the manager?
Think about what happens when you decide to install a second webapp; best
practice dictates that you not have to modify the global config to do so.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org