To make use a <GlobalNamingResources> .. </GlobalNamingResources>, you'll have to put a ResourceLink element in your webapp's context.xml file.

See the end of http://tomcat.apache.org/tomcat-6.0-doc/config/globalresources.html for more information.


--David



G M wrote:
Thanks!

It worked when I put the <Context.../> in the context.xml of my webapp
META-INF directory.
However when I tried to put it in the global context.xml it doesn't work.
Tomcat should put this information in his example.

Why it doesn't work in the global context.xml, any ideas?

Here is the context if you need to check it out.

<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application -->
<Context path="/DBTest" docBase="DBTest"
        debug="5" reloadable="true" crossContext="true">

    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource
"
               maxActive="100" maxIdle="30" maxWait="10000"
               username="gabo" password="huevos" driverClassName="
com.mysql.jdbc.Driver"

url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>

</Context>


Thank you a lot, is great to have my app up and running!

Gabriel Moreno

2007/8/9, Caldarale, Charles R <[EMAIL PROTECTED]>:
From: David Smith [mailto:[EMAIL PROTECTED]
Subject: Re: 6.0.13 MySQL DBCP Example

1. I would merge the <Context .... /> element from server.xml to your
context.xml file and remove the Context element from your
server.xml.
Just a point of clarification: the context.xml above refers to the one
in your webapp's META-INF directory, not the global one in Tomcat's conf
directory.

- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to