Thanks Chris, but here is the part I don't exactly understand : >The webapp signifies its desire to use that resource by including a complimentary ><resource-ref> section in the deployment descriptor.
A webapp ( at least under tomcat 4.1 ) does not require the <resource-ref> section to be in place, for it to use a jndi resource that is already defined in a <resource> section of it's context element. Is Tomcat just being nice about this ? Or is the point on the <resource-ref> to inform the container at deployment time, that the webapp requires such a resource to exist ? I think that's what the servlet spec is saying, but the English is a little muddled : "These developer uses these elements describe certain objects that the web application requires to be registered in the JNDI namespace in the web container at runtime" > -----Original Message----- > From: Christopher Schultz [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 19, 2003 8:31 AM > To: Tomcat Users List > Subject: Re: Relationship between server.xml/Resource and > web.xml/resource-ref. > > > Florian, > > Is it completely up to the developers/deployers wether the necessary > > resources get declared in the server or in the application? > > This is correct. > > > Is it just > > for convenience, so that deployer doesn't have to unpack the WAR? > > No, this has nothing to do with unpacking WAR files. > > > Or -- > > like someone stated on this list (to my confusion) -- that the > > server.xml Resource element and the web.xml resource-ref have a relation > > that is similar to that of an implementation class instance and an > > interface? > > This is an apt analogy. The server.xml sets up the actual resource > (often in the <GlobalNamingResources> section), then allows the > application to use it (by adding a <ResourceLink> section in the > <Context> where you want to use it). The webapp signifies its desire to > use that resource by including a complimentary <resource-ref> section in > the deployment descriptor. > > -chris > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
