Thanks! Not sure why I didn't see that before! Perhaps someone could update the API docs for findDataSource() so it directs the user to this function instead.
Thanks again! Craig. >From: "julio" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >Subject: RES: Datasource Retrieval in 1.1 (Help needed) >Date: Fri, 6 Sep 2002 12:07:52 -0300 > >Hi Craig, > >This question was already answered, look for the subject "Connection >Pool Question"(15/08/2002). Anyway, the code... > >" >Then, in your action, you can access your datasource via: >execute(......) >{ >DataSource ds = this.getDataSource(request); >} >... >... >" > >________________________________ >Julio Cesar >Softsite Tecnologia Ltda >http://www.softsite.com.br >Fortaleza, CE, Brasil > >-----Mensagem original----- >De: Craig Tataryn [mailto:[EMAIL PROTECTED]] >Enviada em: sexta-feira, 6 de setembro de 2002 11:47 >Para: [EMAIL PROTECTED] >Assunto: Re: Datasource Retrieval in 1.1 (Help needed) > >From ActionServlet.findDatasource() API docs: >Deprecated. Look up data sources directly in servlet context attributes > >So I replaced my call to : >dataSource = getServlet().findDatasource(null); > >with: >dataSource = >(DataSource)getServlet().getServletContext().getAttribute(this.DATA_SOUR >CE_KEY); > >And my datasource is retuned as null. > >Anyone know what's going on? > >Craig. > > >From: "Craig Tataryn" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: Re: Datasource Retrieval in 1.1 > >Date: Thu, 05 Sep 2002 14:09:35 -0500 > > > >Ok, read the DTD for struts-config.xml and figured out that I would use >the > >"key" attribute if I were to add another datasource. I would still >like to > >know how to retrieve the datasource without using the deprecated > >findDatasource() method. > > > >Thanks, > > > >Craig. > > > > > >>From: "Craig Tataryn" <[EMAIL PROTECTED]> > >>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >>To: [EMAIL PROTECTED] > >>Subject: Datasource Retrieval in 1.1 > >>Date: Thu, 05 Sep 2002 11:30:39 -0500 > >> > >>The documentation still lists the old way of how to retrieve a >datasource > >>which has been setup in struts-config.xml using findDatasource(); > >> > >>The API says to "use datasource stored in attributes". Can someone >give > >>an example of how I might do this from within my execute method? I >want > >>to get rid of my deprecation warnings for findDatasource() > >> > >>As well, I believe you can have multiple datasources setup in > >>struts-config.xml. The default datasource being keyed by > >>org.apache.struts.action.Action.DATA_SOURCE_KEY. Could someone point >me > >>to an example of multiple datasources and how to setup keys for each? > >> > >>Thanks, > >> > >>Craig. > >> > >>Craig W. Tataryn > >>Programmer/Analyst > >>Compuware > >> > >>_________________________________________________________________ > >>Join the world's largest e-mail service with MSN Hotmail. > >>http://www.hotmail.com > >> > >> > >>-- > >>To unsubscribe, e-mail: > >><mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: > >><mailto:[EMAIL PROTECTED]> > > > > > >Craig W. Tataryn > >Programmer/Analyst > >Compuware > > > >_________________________________________________________________ > >MSN Photos is the easiest way to share and print your photos: > >http://photos.msn.com/support/worldwide.aspx > > > > > >-- > >To unsubscribe, e-mail: > ><mailto:[EMAIL PROTECTED]> > >For additional commands, e-mail: > ><mailto:[EMAIL PROTECTED]> > > >Craig W. Tataryn >Programmer/Analyst >Compuware > >_________________________________________________________________ >Send and receive Hotmail on your mobile device: http://mobile.msn.com > > >-- >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]> Craig W. Tataryn Programmer/Analyst Compuware _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>