You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ziggy <zi...@gmail.com> on 2008/10/09 18:17:22 UTC

context.xml in META-INF

Hi all,

I have the following datasource definition in my /META-INF/context.xml

<Resource name="jdbc/testdb" auth="Container"
              type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
              url="jdbc:oracle:thin:@10.10.10.10:1521:testdb"
              username="testuser" password="testuser" maxActive="20"
maxIdle="10"
              maxWait="-1"/>

For some reason the above does not work when i deploy the .war file.
It does however work if i rename the context.xml file into
[applicationname].xml and put it into $TOMCAT_HOME/catalina/localhost/

Does anyone know why it doesnt work if in app/META-INF/context.xml?

I am using tomcat 5.5

Thanks

Re: context.xml in META-INF

Posted by Ziggy <zi...@gmail.com>.
Please ingnore this. There was a typo in the filename thats why it wasnt
working.

Thanks

On Thu, Oct 9, 2008 at 5:17 PM, Ziggy <zi...@gmail.com> wrote:

> Hi all,
>
> I have the following datasource definition in my /META-INF/context.xml
>
> <Resource name="jdbc/testdb" auth="Container"
>               type="javax.sql.DataSource"
> driverClassName="oracle.jdbc.driver.OracleDriver"
>               url="jdbc:oracle:thin:@10.10.10.10:1521:testdb"
>               username="testuser" password="testuser" maxActive="20"
> maxIdle="10"
>               maxWait="-1"/>
>
> For some reason the above does not work when i deploy the .war file.
> It does however work if i rename the context.xml file into
> [applicationname].xml and put it into $TOMCAT_HOME/catalina/localhost/
>
> Does anyone know why it doesnt work if in app/META-INF/context.xml?
>
> I am using tomcat 5.5
>
> Thanks
>