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
***************************************************************************

Reply via email to