tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Janner <>
Subject RE: <resource-ref> in web.xml
Date Tue, 23 Apr 2013 15:40:03 GMT
> -----Original Message-----
> From: Christopher Schultz []
> Sent: Thursday, April 18, 2013 5:01 PM
> To: Tomcat Users List
> Subject: Re: <resource-ref> in web.xml
> Hash: SHA256
> Jakub,
> On 4/17/13 9:22 PM, Jakub 1983 wrote:
> > can I define database connection only in web.xml, without using
> > context.xml files ?
> >
> > can I pass database url, login and password into <resource-ref> ?
> >
> > when I define database conn in context.xml, resource-ref is not
> needed
> > at all, so what is it actually for ?
> If you define your database configuration in server.xml, you'll have to
> map from global to local scope. You don't need to do this with
> context.xml because the scope is -- by definition -- already local.
> - -chris

Chris -
Am I reading that correctly?  If in my context.xml file, I define a DB resource as:
... obviously redacted stuff ...
I DO NOT need to add these lines to my web.xml?
    <description>Oracle Universal Connection Pool</description>

That also brings up another, related, question.
In my old web.xml, I had this entry:
Which I removed and replaced with an entry in the context.xml file:
  <Parameter name="LOG4J_PROPS" value="/WEB-INF/" override="false" />
However, that didn't work. I had to provide the full path to the file in the value parameter.
Is there a particular reason why?  Or would it be something inside our code?
We are set up multi-tenant and trying to minimize the changes needed per tenant.
I'm using Tomcat 6.0.36 with Sun JDK 1.6.0_43.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message