Hi,

On Mon, Aug 31, 2009 at 1:12 AM, Martin Gainty<mgai...@hotmail.com> wrote:
>
> mandatory: define the attributes in <Context><Resource> in 
> applicationContext.xml
> OR
> optionally define the resource attributes <resource-env-ref> or 
> <resource-ref> in web.xml
>
> http://proteinbank.vbi.vt.edu/tomcat-docs/config/context.html#Resource%20Definitions

Thanks for the reply, I was just looking at the same information here:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource%20Definitions

But aren't all examples uhm, a bit wrong then? Since they all define
those attributes in <Context><Resource> in context.xml
(applicationContext.xml?) as well as in <resource-ref> in web.xml. But
if I understand correctly you can leave out the attributes auth,
description and type from <Context><Resource> and put just these 3 in
<resource-ref> in web.xml? If you put all of those in
<Context><Resource> in context.xml then indeed no resource-ref is
needed?

I still find this a little awkward, even 'authoritative' documentation
like this one: http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
uses both resource-ref or resource-env-ref in web.xml but uses the
attributes auth and type anyway in context.xml. Only description is
consistently only used in web.xml for all examples, but it seems a bit
silly to teach developers to create and maintain those entries in
web.xml, only for this description element that 99% of the actual code
doesn't see nor uses.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to