Re: Multiple DataSource Problem

2002-12-06 Thread David Graham
Hmm, I don't see anything wrong with that.  What version of Struts are you 
using?  You should check the struts-config_1_1.dtd (or appropriate version 
number) for available elements and attributes.  The xml errors indicate you 
have an element missing the property attribute.

David






From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Multiple DataSource Problem
Date: Fri, 6 Dec 2002 14:23:55 -0600




  
="oracle.jdbc.driver.OracleDriver"/>
  
  
  


  
="oracle.jdbc.driver.OracleDriver"/>
  
  
  

  

Tim Bachta
Information Technology
MC 48



  "David Graham"
  
  ail.com>     cc:
       Subject:  Re: Multiple 
DataSource Problem
  12/06/2002 02:21
  PM
  Please respond to
  "Struts Users
  Mailing List"






Ok, post your entire  section.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Fri, 6 Dec 2002 13:57:36 -0600
>
>
>That gives me a xml parse error:
>
>-INF/struts-config.xml: XML-0138: (Error) REQUIRED
>attribute 'property' is not
>pecified. 
>file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts
>config.xml: XML-0138: (Error) REQUIRED attribute
>'property' is not specified.>
>org.xml.sax.SAXParseException:
>file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-config.xml
>Line 17, Column 34>: XML-0138: (Error) REQUIRED attribute 'value' is not
>specified.
> at
>oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:231)
> at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:156)
> at
>oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)

> at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
> at 
org.apache.commons.digester.Digester.parse(Digester.java:1495)
> at
>org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)

> at
>org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
> at javax.servlet.GenericServlet.init(GenericServlet.java:44)
> at
>com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:1673)

> at
>com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4006)

> at
>com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4105)

> at
>com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:579)

> at
>com.evermind.server.http.HttpApplication.(HttpApplication.java:376)
> at
>com.evermind.server.Application.getHttpApplication(Application.java:657)
> at
>com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:663)

> at
>com.evermind.server.http.HttpSite.getApplication(HttpSite.java:387)
> at
>com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:378)

> at
>com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)

> at
>com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
>[ERROR] Digester - -Parse Error at line 17 column 34:
>file:/C:/oracle/j2ee/home/applications/MRA/WE
>-INF/struts-config.xml: XML-0138: (Error) REQUIRED
>attribute 'value' is not spe
>ified. 
>file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-co
>fig.xml: XML-0138: (Error) REQUIRED attribute 'value'
>is not specified.>
>oracle.xml.parser.v2.XMLParseException: Attribute 'key' used but not
>declared.
> at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:208)
> at
>oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)

> at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
> at 
org.apache.commons.digester.Digester.parse(Digester.java:1495)
> at
>org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)

> at
>org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
> at javax.servlet.GenericServlet.init(GenericServlet.ja

Re: Multiple DataSource Problem

2002-12-06 Thread tbachta



  
  
  
  


  
  
  
  

  

Tim Bachta
Information Technology
MC 48


   

  "David Graham"   

   cc: 

   Subject:  Re: Multiple DataSource 
Problem   
  12/06/2002 02:21 

  PM   

  Please respond to

  "Struts Users

  Mailing List"

   

   





Ok, post your entire  section.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Fri, 6 Dec 2002 13:57:36 -0600
>
>
>That gives me a xml parse error:
>
>-INF/struts-config.xml: XML-0138: (Error) REQUIRED
>attribute 'property' is not
>pecified. file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts
>config.xml: XML-0138: (Error) REQUIRED attribute
>'property' is not specified.>
>org.xml.sax.SAXParseException:
>file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-config.xml
>Line 17, Column 34>: XML-0138: (Error) REQUIRED attribute 'value' is not
>specified.
> at
>oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:231)
> at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:156)
> at
>oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)

> at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
> at org.apache.commons.digester.Digester.parse(Digester.java:1495)
> at
>org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)

> at
>org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
> at javax.servlet.GenericServlet.init(GenericServlet.java:44)
> at
>com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:1673)

> at
>com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4006)

> at
>com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4105)

> at
>com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:579)

> at
>com.evermind.server.http.HttpApplication.(HttpApplication.java:376)
> at
>com.evermind.server.Application.getHttpApplication(Application.java:657)
> at
>com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:663)

> at
>com.evermind.server.http.HttpSite.getApplication(HttpSite.java:387)
> at
>com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:378)

> at
>com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)

> at
>com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
>[ERROR] Digester - -Parse Error at line 17 column 34:
>file:/C:/oracle/j2ee/home/applications/MRA/WE
>-INF/struts-config.xml: XML-0138: (Error) REQUIRED
>attribute 'value' is not spe
>ified. file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-co
>fig.xml: XML-0138: (Error) REQUIRED attribute 'value'
>is not specified.>
>oracle.xml.parser.v2.XMLParseException: Attribute 'key' used but not
>declared.
> at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:208)
> at
>oracle.xml.parser.v2.NonValidat

Re: Multiple DataSource Problem

2002-12-06 Thread David Graham
Ok, post your entire  section.

David







From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Multiple DataSource Problem
Date: Fri, 6 Dec 2002 13:57:36 -0600


That gives me a xml parse error:

-INF/struts-config.xml: XML-0138: (Error) REQUIRED
attribute 'property' is not
pecified. 
file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts
config.xml: XML-0138: (Error) REQUIRED attribute
'property' is not specified.>
org.xml.sax.SAXParseException:
file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-config.xml
Line 17, Column 34>: XML-0138: (Error) REQUIRED attribute 'value' is not
specified.
at
oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:231)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:156)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:1673)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4006)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4105)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:579)
at
com.evermind.server.http.HttpApplication.(HttpApplication.java:376)
at
com.evermind.server.Application.getHttpApplication(Application.java:657)
at
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:663)
at
com.evermind.server.http.HttpSite.getApplication(HttpSite.java:387)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:378)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at 
com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
[ERROR] Digester - -Parse Error at line 17 column 34:
file:/C:/oracle/j2ee/home/applications/MRA/WE
-INF/struts-config.xml: XML-0138: (Error) REQUIRED
attribute 'value' is not spe
ified. 
file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-co
fig.xml: XML-0138: (Error) REQUIRED attribute 'value'
is not specified.>
oracle.xml.parser.v2.XMLParseException: Attribute 'key' used but not
declared.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:208)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:1673)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4006)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4105)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:579)
at
com.evermind.server.http.HttpApplication.(HttpApplication.java:376)
at
com.evermind.server.Application.getHttpApplication(Application.java:657)
at
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:663)
at
com.evermind.server.http.HttpSite.getApplication(HttpSite.java:387)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:378)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at 
com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
[ERROR] ActionServlet - -Parsing error processing resource path
/WEB-INF/struts-config.xml 
ml.parser.v2.XMLParseException: Attribute 'key' used but not declared.>

Any other ideas? I am willing to try anything.

Tim Bachta
Information Technology
MC 48



  "David Graham"
      
      ail.com> cc:
   Subject:  Re: Multiple 
DataSource Problem
  12/06/2002 01:39
  PM
  Please respond to
  "Struts Users
  Mailing List"

Re: Multiple DataSource Problem

2002-12-06 Thread tbachta

That gives me a xml parse error:

-INF/struts-config.xml: XML-0138: (Error) REQUIRED
attribute 'property' is not
pecified. : XML-0138: (Error) REQUIRED attribute
'property' is not specified.>
org.xml.sax.SAXParseException:
file:/C:/oracle/j2ee/home/applications/MRA/WEB-INF/struts-config.xml
Line 17, Column 34>: XML-0138: (Error) REQUIRED attribute 'value' is not
specified.
at
oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:231)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:156)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:1673)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4006)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4105)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:579)
at
com.evermind.server.http.HttpApplication.(HttpApplication.java:376)
at
com.evermind.server.Application.getHttpApplication(Application.java:657)
at
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:663)
at
com.evermind.server.http.HttpSite.getApplication(HttpSite.java:387)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:378)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
[ERROR] Digester - -Parse Error at line 17 column 34:
file:/C:/oracle/j2ee/home/applications/MRA/WE
-INF/struts-config.xml: XML-0138: (Error) REQUIRED
attribute 'value' is not spe
ified. : XML-0138: (Error) REQUIRED attribute 'value'
is not specified.>
oracle.xml.parser.v2.XMLParseException: Attribute 'key' used but not
declared.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:208)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:860)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:1673)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4006)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4105)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:579)
at
com.evermind.server.http.HttpApplication.(HttpApplication.java:376)
at
com.evermind.server.Application.getHttpApplication(Application.java:657)
at
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:663)
at
com.evermind.server.http.HttpSite.getApplication(HttpSite.java:387)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:378)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
[ERROR] ActionServlet - -Parsing error processing resource path
/WEB-INF/struts-config.xml 

Any other ideas? I am willing to try anything.

Tim Bachta
Information Technology
MC 48


   

  "David Graham"   

   cc: 
    
       Subject:  Re: Multiple DataSource 
Problem   
  12/06/2002 01:39 

  PM   

  Please respond to
 

Re: Multiple DataSource Problem

2002-12-06 Thread David Graham
Try my original suggestion:


David








From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Multiple DataSource Problem
Date: Fri, 6 Dec 2002 13:02:34 -0600


Ok I have tried that and I am getting a null pointer exception caused by
the DataSource, here is my code

ServletContext context = servlet.getServletContext();
  DataSource dataSource = (DataSource) context.getAttribute("MRA");
  conn = dataSource.getConnection();
  stmt = conn.createStatement();
  rs = stmt.executeQuery(sql);


My struts.xml is this;



  
  
="oracle.jdbc.driver.OracleDriver"/>
  
  
  


  
  
="oracle.jdbc.driver.OracleDriver"/>
  
  
  

  

I dont see what I am doing wrong please help.  Thank you

Tim Bachta
Information Technology
MC 48




  "David Graham"
  
  ail.com>     cc:
       Subject:  Re: Multiple 
DataSource Problem
  12/06/2002 12:45
  PM
  Please respond to
  "Struts Users
  Mailing List"






From action.execute()

DataSource ds1 =
(DataSource)this.getServlet().getServletContext().getAttribute
("YOUR_DS_KEY"));

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Fri, 6 Dec 2002 12:30:36 -0600
>
>
>Ok , I thought I have already changed the key value's to "MRA" and
>"PHONE_DB" in both of my data-sources, what I am having trouble with is
how
>do I refrence these values in the form and action classes?
>
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>       "David Graham"
>   
>[EMAIL PROTECTED]
>   ail.com> cc:
>Subject:  Re: Multiple
>DataSource Problem
>   12/05/2002 04:09
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
>
>
>
>That would store the DataSource under the Struts default value, which
>obviously only allows for one DataSource.  Just change the key value to
>something else to store multiple DataSources.
>
>David
>
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Multiple DataSource Problem
> >Date: Thu, 5 Dec 2002 15:01:21 -0600
> >
> >
> >Can you show me a code snip of how to use this?
> >
> >
> >Tim Bachta
> >Information Technology
> >MC 48
> >
> >
> >
> >
> >   "David Graham"
> >   
> >[EMAIL PROTECTED]
> >   ail.com> cc:
> >Subject:  Re: Multiple
> >DataSource Problem
> >   12/05/2002 02:45
> >   PM
> >   Please respond to
> >   "Struts Users
> >   Mailing List"
> >
> >
> >
> >
> >
> >
> >Use the key attribute of the data-source element.
> >
> >David
> >
> >
> >
> >
> >
> >
> > >From: [EMAIL PROTECTED]
> > >Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: Re: Multiple DataSource Problem
> > >Date: Thu, 5 Dec 2002 14:02:31 -0600
> > >
> > >
> > >Did I not give each data-source element its own key?
> > >
> > >Tim Bachta
> > >Information Technology
> > >MC 48
> > >
> > >
> > >
> > >
> > >       "David Graham"
> > >   
> > >[EMAIL PROTECTED]
> > >   ail.com>  

Re: Multiple DataSource Problem

2002-12-06 Thread tbachta

Ok I have tried that and I am getting a null pointer exception caused by
the DataSource, here is my code

ServletContext context = servlet.getServletContext();
  DataSource dataSource = (DataSource) context.getAttribute("MRA");
  conn = dataSource.getConnection();
  stmt = conn.createStatement();
  rs = stmt.executeQuery(sql);


My struts.xml is this;



  
  
  
  
  


  
  
  
  
  

  

I dont see what I am doing wrong please help.  Thank you

Tim Bachta
Information Technology
MC 48



   

  "David Graham"   

   cc: 

   Subject:  Re: Multiple DataSource 
Problem   
  12/06/2002 12:45 

  PM   

  Please respond to

  "Struts Users

  Mailing List"

   

   





>From action.execute()

DataSource ds1 =
(DataSource)this.getServlet().getServletContext().getAttribute
("YOUR_DS_KEY"));

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Fri, 6 Dec 2002 12:30:36 -0600
>
>
>Ok , I thought I have already changed the key value's to "MRA" and
>"PHONE_DB" in both of my data-sources, what I am having trouble with is
how
>do I refrence these values in the form and action classes?
>
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>   "David Graham"
>       [EMAIL PROTECTED]
>   ail.com> cc:
>Subject:  Re: Multiple
>DataSource Problem
>   12/05/2002 04:09
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
>
>
>
>That would store the DataSource under the Struts default value, which
>obviously only allows for one DataSource.  Just change the key value to
>something else to store multiple DataSources.
>
>David
>
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Multiple DataSource Problem
> >Date: Thu, 5 Dec 2002 15:01:21 -0600
> >
> >
> >Can you show me a code snip of how to use this?
> >
> >
> >Tim Bachta
> >Information Technology
> >MC 48
> >
> >
> >
> >
> >   "David Graham"
> >>[EMAIL PROTECTED]
> >   ail.com> cc:
> >Subject:  Re: Multiple
> >DataSource Problem
> >   12/05/2002 02:45
> >   PM
> >   Please respond to
> >   "Struts Users
> >   Mailing List"
> >
> >
> >
> >
> >
> >
> >Use the key attribute of the data-source element.
> >
> >David
> >
> >
> >
> >
> >
> >
> > >From: [EMAIL PROTEC

Re: Multiple DataSource Problem

2002-12-06 Thread David Graham
From action.execute()


DataSource ds1 = 
(DataSource)this.getServlet().getServletContext().getAttribute("YOUR_DS_KEY"));

David






From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Multiple DataSource Problem
Date: Fri, 6 Dec 2002 12:30:36 -0600


Ok , I thought I have already changed the key value's to "MRA" and
"PHONE_DB" in both of my data-sources, what I am having trouble with is how
do I refrence these values in the form and action classes?


Tim Bachta
Information Technology
MC 48



  "David Graham"
  
  ail.com>     cc:
       Subject:  Re: Multiple 
DataSource Problem
  12/05/2002 04:09
  PM
  Please respond to
  "Struts Users
  Mailing List"








That would store the DataSource under the Struts default value, which
obviously only allows for one DataSource.  Just change the key value to
something else to store multiple DataSources.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Thu, 5 Dec 2002 15:01:21 -0600
>
>
>Can you show me a code snip of how to use this?
>
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>
>   "David Graham"
>   
>[EMAIL PROTECTED]
>   ail.com> cc:
>Subject:  Re: Multiple
>DataSource Problem
>   12/05/2002 02:45
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
>
>Use the key attribute of the data-source element.
>
>David
>
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Multiple DataSource Problem
> >Date: Thu, 5 Dec 2002 14:02:31 -0600
> >
> >
> >Did I not give each data-source element its own key?
> >
> >Tim Bachta
> >Information Technology
> >MC 48
> >
> >
> >
> >
> >   "David Graham"
> >   
> >[EMAIL PROTECTED]
> >   ail.com> cc:
> >Subject:  Re: Multiple
> >DataSource Problem
> >   12/05/2002 01:41
> >       PM
> >   Please respond to
> >   "Struts Users
> >   Mailing List"
> >
> >
> >
> >
> >
> >
> >You need to give each data-source element its own key.  Struts stores
the
> >DataSource under that key in the ServletContext.
> >
> >David
> >
> >
> >
> >
> >
> >
> > >From: [EMAIL PROTECTED]
> > >Reply-To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: Multiple DataSource Problem
> > >Date: Thu, 5 Dec 2002 13:20:01 -0600
> > >
> > >I am having trouble getting multiple datasources to work in my
> >application.
> > >I have searched the archives and found inofrmation on how to do it 
but
> >the
> > >solutions given are depricated.  Can anyone help me?
> > >
> > >
> > >
> > > 
> > >   
> > >   
> > >="oracle.jdbc.driver.OracleDriver"/>
> > >   
>value="jdbc:oracle:thin:
> > >@147.101.104.63:1524:common"/>
> > >   
> > >   
> > > 
> > > 
> > >   
> > >   
> > >="oracle.jdbc.driver.OracleDriver"/>
> > >   
>value="jdbc:oracle:thin:
> > >@oid:1521:infoprd"/>
> > >   
> > >   
>value="info_user"/>
> > > 
> > >   
> > >
> >

Re: Multiple DataSource Problem

2002-12-06 Thread tbachta

Ok , I thought I have already changed the key value's to "MRA" and
"PHONE_DB" in both of my data-sources, what I am having trouble with is how
do I refrence these values in the form and action classes?


Tim Bachta
Information Technology
MC 48


   

  "David Graham"   

   cc: 

       Subject:  Re: Multiple DataSource 
Problem   
  12/05/2002 04:09 

  PM   

  Please respond to

  "Struts Users

  Mailing List"

   

   







That would store the DataSource under the Struts default value, which
obviously only allows for one DataSource.  Just change the key value to
something else to store multiple DataSources.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Thu, 5 Dec 2002 15:01:21 -0600
>
>
>Can you show me a code snip of how to use this?
>
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>
>   "David Graham"
>   [EMAIL PROTECTED]
>   ail.com> cc:
>Subject:  Re: Multiple
>DataSource Problem
>   12/05/2002 02:45
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
>
>Use the key attribute of the data-source element.
>
>David
>
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Multiple DataSource Problem
> >Date: Thu, 5 Dec 2002 14:02:31 -0600
> >
> >
> >Did I not give each data-source element its own key?
> >
> >Tim Bachta
> >Information Technology
> >MC 48
> >
> >
> >
> >
> >   "David Graham"
> >>[EMAIL PROTECTED]
> >   ail.com> cc:
> >Subject:  Re: Multiple
> >DataSource Problem
> >   12/05/2002 01:41
> >   PM
> >   Please respond to
> >   "Struts Users
> >   Mailing List"
> >
> >
> >
> >
> >
> >
> >You need to give each data-source element its own key.  Struts stores
the
> >DataSource under that key in the ServletContext.
> >
> >David
> >
> >
> >
> >
> >
> >
> > >From: [EMAIL PROTECTED]
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: Multiple DataSource Problem
> > >Date: Thu, 5 Dec 2002 13:20:01 -0600
> > >
> > >I am having trouble getting multiple datasources to work in my
> >application.
> > >I have searched the archives and found inofrmation on how to do it but
> >the
> > >solutions given are depricated.  Can anyone help me?
> > >
> > >
> > >
> > > 
> > >   
> > >&

Re: Multiple DataSource Problem

2002-12-05 Thread David Graham


That would store the DataSource under the Struts default value, which 
obviously only allows for one DataSource.  Just change the key value to 
something else to store multiple DataSources.

David






From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Multiple DataSource Problem
Date: Thu, 5 Dec 2002 15:01:21 -0600


Can you show me a code snip of how to use this?


Tim Bachta
Information Technology
MC 48




  "David Graham"
  
  ail.com> cc:
           Subject:  Re: Multiple 
DataSource Problem
  12/05/2002 02:45
  PM
  Please respond to
  "Struts Users
  Mailing List"






Use the key attribute of the data-source element.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Thu, 5 Dec 2002 14:02:31 -0600
>
>
>Did I not give each data-source element its own key?
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>
>   "David Graham"
>   
>[EMAIL PROTECTED]
>   ail.com> cc:
>Subject:  Re: Multiple
>DataSource Problem
>   12/05/2002 01:41
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
>
>You need to give each data-source element its own key.  Struts stores the
>DataSource under that key in the ServletContext.
>
>David
>
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Multiple DataSource Problem
> >Date: Thu, 5 Dec 2002 13:20:01 -0600
> >
> >I am having trouble getting multiple datasources to work in my
>application.
> >I have searched the archives and found inofrmation on how to do it but
>the
> >solutions given are depricated.  Can anyone help me?
> >
> >
> >
> > 
> >   
> >   
> >="oracle.jdbc.driver.OracleDriver"/>
> >   
> >   
> >   
> > 
> > 
> >   
> >   
> >="oracle.jdbc.driver.OracleDriver"/>
> >   
> >   
> >   
> > 
> >   
> >
> >
> >
> >try
> > {
> >   ServletContext context = servlet.getServletContext();
> >   DataSource dataSource = (DataSource)
> >context.getAttribute(Action.DATA_SOURCE_KEY);
> >   conn = dataSource.getConnection();
> >   stmt = conn.createStatement();
> >   rs = stmt.executeQuery(sql);
> >
> >  Thank you for your help
> >
> >Tim Bachta
> >Information Technology
> >MC 48
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
>
>
>_
>MSN 8 with e-mail virus protection service: 2 months FREE*
>http://join.msn.com/?page=features/virus
>
>
>--
>To unsubscribe, e-mail:   <
>mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <
>mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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







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


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



Re: Multiple DataSource Problem

2002-12-05 Thread tbachta

Can you show me a code snip of how to use this?


Tim Bachta
Information Technology
MC 48



   

  "David Graham"   

   cc: 

   Subject:  Re: Multiple DataSource 
Problem   
  12/05/2002 02:45 

  PM   

  Please respond to

  "Struts Users

  Mailing List"

   

   





Use the key attribute of the data-source element.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: Multiple DataSource Problem
>Date: Thu, 5 Dec 2002 14:02:31 -0600
>
>
>Did I not give each data-source element its own key?
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>
>   "David Graham"
>   [EMAIL PROTECTED]
>       ail.com> cc:
>Subject:  Re: Multiple
>DataSource Problem
>   12/05/2002 01:41
>   PM
>   Please respond to
>   "Struts Users
>   Mailing List"
>
>
>
>
>
>
>You need to give each data-source element its own key.  Struts stores the
>DataSource under that key in the ServletContext.
>
>David
>
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Multiple DataSource Problem
> >Date: Thu, 5 Dec 2002 13:20:01 -0600
> >
> >I am having trouble getting multiple datasources to work in my
>application.
> >I have searched the archives and found inofrmation on how to do it but
>the
> >solutions given are depricated.  Can anyone help me?
> >
> >
> >
> > 
> >   
> >>="oracle.jdbc.driver.OracleDriver"/>
> >   
> >   
> >   
> > 
> > 
> >   
> >>="oracle.jdbc.driver.OracleDriver"/>
> >   
> >   
> >   
> > 
> >   
> >
> >
> >
> >try
> > {
> >   ServletContext context = servlet.getServletContext();
> >   DataSource dataSource = (DataSource)
> >context.getAttribute(Action.DATA_SOURCE_KEY);
> >   conn = dataSource.getConnection();
> >   stmt = conn.createStatement();
> >   rs = stmt.executeQuery(sql);
> >
> >  Thank you for your help
> >
> >Tim Bachta
> >Information Technology
> >MC 48
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
>
>
>_
>MSN 8 with e-mail virus protection service: 2 months FREE*
>http://join.msn.com/?page=features/virus
>
>
>--
>To unsubscribe, e-mail:   <
>mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <
>mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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







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




Re: Multiple DataSource Problem

2002-12-05 Thread David Graham
Use the key attribute of the data-source element.

David







From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Multiple DataSource Problem
Date: Thu, 5 Dec 2002 14:02:31 -0600


Did I not give each data-source element its own key?

Tim Bachta
Information Technology
MC 48




  "David Graham"
  
  ail.com> cc:
           Subject:  Re: Multiple 
DataSource Problem
  12/05/2002 01:41
  PM
  Please respond to
  "Struts Users
  Mailing List"






You need to give each data-source element its own key.  Struts stores the
DataSource under that key in the ServletContext.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Multiple DataSource Problem
>Date: Thu, 5 Dec 2002 13:20:01 -0600
>
>I am having trouble getting multiple datasources to work in my
application.
>I have searched the archives and found inofrmation on how to do it but 
the
>solutions given are depricated.  Can anyone help me?
>
>
>
> 
>   
>   
>="oracle.jdbc.driver.OracleDriver"/>
>   
>   
>   
> 
> 
>   
>   
>="oracle.jdbc.driver.OracleDriver"/>
>   
>   
>   
> 
>   
>
>
>
>try
> {
>   ServletContext context = servlet.getServletContext();
>   DataSource dataSource = (DataSource)
>context.getAttribute(Action.DATA_SOURCE_KEY);
>   conn = dataSource.getConnection();
>   stmt = conn.createStatement();
>   rs = stmt.executeQuery(sql);
>
>  Thank you for your help
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus


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







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


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: Multiple DataSource Problem

2002-12-05 Thread tbachta

Did I not give each data-source element its own key?

Tim Bachta
Information Technology
MC 48



   

  "David Graham"   

   cc: 

   Subject:  Re: Multiple DataSource 
Problem   
  12/05/2002 01:41 

  PM   

  Please respond to

  "Struts Users

  Mailing List"

   

   





You need to give each data-source element its own key.  Struts stores the
DataSource under that key in the ServletContext.

David






>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Multiple DataSource Problem
>Date: Thu, 5 Dec 2002 13:20:01 -0600
>
>I am having trouble getting multiple datasources to work in my
application.
>I have searched the archives and found inofrmation on how to do it but the
>solutions given are depricated.  Can anyone help me?
>
>
>
> 
>   
>   ="oracle.jdbc.driver.OracleDriver"/>
>   
>   
>   
> 
> 
>   
>   ="oracle.jdbc.driver.OracleDriver"/>
>   
>   
>   
> 
>   
>
>
>
>try
> {
>   ServletContext context = servlet.getServletContext();
>   DataSource dataSource = (DataSource)
>context.getAttribute(Action.DATA_SOURCE_KEY);
>   conn = dataSource.getConnection();
>   stmt = conn.createStatement();
>   rs = stmt.executeQuery(sql);
>
>  Thank you for your help
>
>Tim Bachta
>Information Technology
>MC 48
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus


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







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




Re: Multiple DataSource Problem

2002-12-05 Thread David Graham
You need to give each data-source element its own key.  Struts stores the 
DataSource under that key in the ServletContext.

David






From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Multiple DataSource Problem
Date: Thu, 5 Dec 2002 13:20:01 -0600

I am having trouble getting multiple datasources to work in my application.
I have searched the archives and found inofrmation on how to do it but the
solutions given are depricated.  Can anyone help me?




  
  
="oracle.jdbc.driver.OracleDriver"/>
  
  
  


  
  
="oracle.jdbc.driver.OracleDriver"/>
  
  
  

  



try
{
  ServletContext context = servlet.getServletContext();
  DataSource dataSource = (DataSource)
context.getAttribute(Action.DATA_SOURCE_KEY);
  conn = dataSource.getConnection();
  stmt = conn.createStatement();
  rs = stmt.executeQuery(sql);

 Thank you for your help

Tim Bachta
Information Technology
MC 48




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


_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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



Multiple DataSource Problem

2002-12-05 Thread tbachta
I am having trouble getting multiple datasources to work in my application.
I have searched the archives and found inofrmation on how to do it but the
solutions given are depricated.  Can anyone help me?




  
  
  
  
  


  
  
  
  
  

  



try
{
  ServletContext context = servlet.getServletContext();
  DataSource dataSource = (DataSource)
context.getAttribute(Action.DATA_SOURCE_KEY);
  conn = dataSource.getConnection();
  stmt = conn.createStatement();
  rs = stmt.executeQuery(sql);

 Thank you for your help

Tim Bachta
Information Technology
MC 48




--
To unsubscribe, e-mail:   
For additional commands, e-mail: