Thanks Mark for the suggestion. It realy seems to be the "key"-attribute.
But I have a problem with it. If I define more than one data-source then the
servlet-container (tomcat) does not start. The definition is:
<!-- ========== Data Source Configuration
=============================== -->
<data-sources>
<data-source
key="DS1"
description="Data Source 1"
driverClass="org.gjt.mm.mysql.Driver"
password="*"
url="jdbc:mysql://localhost:3306/db1"
user="db1" />
<data-source
key="DS2"
description="Data Source 2"
driverClass="org.gjt.mm.mysql.Driver"
password="*"
url="jdbc:mysql://localhost:3306/db2"
user="db2" />
</data-sources>
Does anyone has a idea what's wrong?
Thanks
Arkadiusz
----- Original Message -----
From: Geddes, Mark (ANTS) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 6:04 PM
Subject: RE: Several Data-Sources in struts-config.xml
> Look at struts-config.dtd. It documents the required attributes. The one
you
> are looking for seems to be 'key'.
>
> Mark
>
> -----Original Message-----
> From: David Corbin [mailto:[EMAIL PROTECTED]]
> Sent: 20 September 2001 15:36
> To: [EMAIL PROTECTED]
> Subject: Re: Several Data-Sources in struts-config.xml
>
>
> I would have guessed, that instead of "<ds1", you'd need "<data-source
> name='ds1'", but I have no specific knowledge to support my guess...
> ----- Original Message -----
> From: "Arkadiusz Janowski" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 20, 2001 9:15 AM
> Subject: Several Data-Sources in struts-config.xml
>
>
> Hi All,
> how can I define more than one data-source for one struts-application?
> I want to read data from two separate databases in one application.
>
> I tried it this way:
> <!-- ========== Data Source Configuration
> =============================== -->
> <data-sources>
>
> <ds1
> description="Data Source Description"
> driverClass="org.gjt.mm.mysql.Driver"
> password="*"
> url="jdbc:mysql://localhost:3306/develop"
> user="*" />
> <ds2.... />
> </data-sources>
>
> the Java-Coding to find the data-source was:
> dataSource1 = servlet.findDataSource( "ds1" );
> dataSource2 = servlet.findDataSource( "ds2" );
>
> But it did not work. Do you have an idea?
>
> Thanks
> Arkadiusz
>
>
>
>
***************************************************************************
> This email message contains confidential information for the above
addressee only. If you are not the intended addressee you must not disclose
or use the information in any manner whatsoever.
>
> Any opinion or views contained in this email message are those of the
sender, do not represent those of the Company in any way and reliance should
not be placed upon its contents.
>
> Unless otherwise stated this email message is not intended to be
contractually binding. Where an Agreement exists between our respective
companies and there is conflict between the contents of this email message
and the Agreement then the terms of that Agreement shall prevail.
>
> Abbey National Treasury Services plc. Registered in England. Registered
Office: Abbey House, Baker Street, London NW1 6XL. Company Registration
No: 2338548. Regulated by the SFA
>
***************************************************************************