At 10:16 AM 2/16/2004 +0000, you wrote:
I not think you can put the JNDI/Resource stuff in the deployment
descriptor, though I stand to be corrected (!)

Well, get ready to start standing....



<resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/TestDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>

That goes in your web.xml. Of course, you are right about the rest. You need to provide the configuration for the jdbc/TestDB Datasource....

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Jake


AFAIK the JNDI/Resource stuff is placed within an application's 'Context'
element.

With Tomcat 5 you can have separate context fragments - individual XML
documents - for each application.

Context fragments are cool because you can update them without having to
touch the server's configuration file (server.xml).

Context fragments reside in $CATALINA_HOME/conf/Catalina/<host> directory
where <host> is the name of the relevant host specified in server.xml. The
default host setting is 'localhost'.

I hope that helps!

Harry Mantheakis
London, UK



> The reference book I have shows how to configure a data resource (JDBC) in the
> server.xml.
>
> Does anyone have a reference on how to do this in the web.xml?
>
> I'd like to be able to unpack a war and have everything run, without the need
> to edit the
> server.xml.
>
> Thanks for your help.
>
> Mike
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to