RE: using struts datasource from a servlet

2003-06-30 Thread Steve Raeburn
Struts stores the datasources as servlet context attributes. You can access the default datasource in your servlet using - (DataSource) getServletContext().getAttribute(Globals.DATA_SOURCE_KEY); Take a look at the struts-config dtd for more info (particularly if you use modules) http

Re: using struts datasource from a servlet

2003-06-30 Thread Richard Raquepo
ic... another question. what if it's not a servlet. just a class i made wherein i call it from one of my action or servlet but still i will need to use struts datasource. how can it be done. thanks everyone. -richard - Original Message - From: Steve Raeburn [EMAIL PROTECTED] To: Struts

RE : using struts datasource from a servlet

2003-06-30 Thread Nicolas Seinlet
Maybe you can pass the datasource as a parameter to the class. -Message d'origine- De : Richard Raquepo [mailto:[EMAIL PROTECTED] Envoyé : lundi 30 juin 2003 8:54 À : Struts Users Mailing List; [EMAIL PROTECTED] ic... another question. what if it's not a servlet. just a class i made

RE: using struts datasource from a servlet

2003-06-30 Thread Steve Raeburn
You can either pass the datasource from your servlet/action as a method parameter or you need to register the datasource somewhere that the class can access. That might be using JNDI, in which case you probably don't need to configure your datasource in Struts but in your container. Another

Re: using struts datasource from a servlet

2003-06-30 Thread Richard Raquepo
Another option would be to configure the DS in struts but register it with a singleton (Service Locator) that can retrieve the datasource in your data access classes. maybe you can give me some link about this? tutorials maybe? any code maybe? :p thanks a lot. - Original Message

Re: DataSource problem

2003-06-15 Thread Joe @ Team345
- Original Message - From: Maarten Roosendaal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 3:42 PM Subject: DataSource problem Hi, I'm trying to create a simple DataBase app. using Struts. Right now i have a problem with getting the DataSource out of the InitialContext

Re: DataSource problem

2003-06-15 Thread Adam Hardy
Good luck to all of us ;) Rainer - Original Message - From: Maarten Roosendaal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 3:42 PM Subject: DataSource problem Hi, I'm trying to create a simple DataBase app. using Struts. Right now i have a problem with getting

Help on an error in my Datasource after upgrading to RC2

2003-06-10 Thread Richard Raquepo
i have this data source in my struts-config.xml... this is not a DBCP Connection right? i doesn't work after i upgraded to RC2 data-source key=DATASOURCE set-property property=driverClass value=com.mysql.jdbc.Driver / set-property property=url value=jdbc:mysql://localhost/crmdev / set

RE: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-09 Thread Srilatha
: Cannot load JDBC driver class using Datasource Connection Am I missing something here? Tomcat keeps on giving me the following exception about my JDBC connection driver not being loaded when I try to establish a datasource connection to a mysql database in struts : Initializing application data

RE: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-09 Thread Brandon Goodin
Subject: RE: Newbie Q: Cannot load JDBC driver class using Datasource Connection I guess u need to put the jdbc2_0-stdext.jar IN THE LIB folder and if u r using mysql put the mysql-connector-java-3.0.6-stable-bin.jar also -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent

Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-07 Thread TopBid987654321
Am I missing something here? Tomcat keeps on giving me the following exception about my JDBC connection driver not being loaded when I try to establish a datasource connection to a mysql database in struts : Initializing application data source org.apache.struts.action.DATA_SOURCE

RE: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-07 Thread Mark Galbreath
do you have your jdbc driver in your classpath? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 1:59 PM To: [EMAIL PROTECTED] Subject: Newbie Q: Cannot load JDBC driver class using Datasource Connection Am I missing something here

Re: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-07 Thread Dimitar Georgievski
: Cannot load JDBC driver class using Datasource Connection do you have your jdbc driver in your classpath? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 1:59 PM To: [EMAIL PROTECTED] Subject: Newbie Q: Cannot load JDBC driver class using

Re: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-07 Thread TopBid987654321
Yes, I have my JDBC driver both in my application's as well as in Tomcat's classpaths

RE: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-07 Thread Brandon Goodin
If you have it in the $TOMCAT_HOME/common/lib, then remove it from you web-app. It is redundant. Also, are you using the Struts Datasource config or Tomcat JNDI? Brandon Goodin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 12:57 PM

Re: Newbie Q: Cannot load JDBC driver class using Datasource Connection

2003-06-07 Thread TopBid987654321
Thanks Brandon , Dimitar, Mark It's working now : After putting the JDBC driver jar in $TOMCAT_HOME/common/lib and referencing it in Tomcat's classpath, it's working!

RE: Datasource

2003-03-25 Thread Mark Galbreath
Yep - fandango on core! Had to throw the Big Red Switch. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 11:00 PM Looks like Mark's brain did a core dump... -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: Tuesday,

Re: Datasource

2003-03-25 Thread James Watkin
See the following message for Craig McClanahan's take on this. http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]msgId=594323 - Jim At 10:28 PM 3/24/2003 -0500, you wrote: I've read the literature and nothing seems definitive. Apparently we can declare a data source by: 1. Declaring it in

[newbie] Finding datasource from pool in struts-config

2003-03-24 Thread Johan Wasserman
Hi, How do you connect to a specific datasource pool (as configured in strusts-config). I have two pools specified; key=logindb key=userdb ActionServlet.findDataSource is depreciated in rc 1.3 Thanks in advance. Johan Wasserman

RE: [newbie] Finding datasource from pool in struts-config

2003-03-24 Thread Johan Wasserman
Sorry, that's in Struts 1.1 rc3 that I found ActionServlet.findDataSource deprecated -Original Message- From: Johan Wasserman Sent: 24 March 2003 14:58 To: '[EMAIL PROTECTED]' Subject: [newbie] Finding datasource from pool in struts-config Hi, How do you connect to a specific

Re: [newbie] Finding datasource from pool in struts-config

2003-03-24 Thread Stephen Smithstone
Action.getDataSource( httpSerlvetRequestObject , logindb ); or Action.getDataSource( httpServletRequest , userdb ); that how i do it in rc1 On Monday 24 March 2003 1:00 pm, Johan Wasserman wrote: Hi, How do you connect to a specific datasource pool (as configured in strusts-config). I

RE: Datasource

2003-03-24 Thread Mark Galbreath
err...pile of this -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:29 PM To: struts Subject: Datasource I've read the literature and nothing seems definitive. Apparently we can declare a data source by: 1. Declaring it in struts

RE: Datasource

2003-03-24 Thread Mark Galbreath
err...pile of this... (too many beers...not enough time...) -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:31 PM To: 'Struts Users Mailing List' Subject: RE: Datasource err...pile of this -Original Message- From: Mark

RE: Datasource

2003-03-24 Thread Mark Galbreath
Well, this is getting interesting. Why does t - i - h - s comes out this? -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:42 PM To: 'Struts Users Mailing List' Subject: RE: Datasource err...pile of this... (too many beers...not enough

Re: Datasource

2003-03-24 Thread Robert McIntosh
List' Subject: RE: Datasource err...pile of this... (too many beers...not enough time...) -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:31 PM To: 'Struts Users Mailing List' Subject: RE: Datasource err...pile of this -Original

RE: Datasource

2003-03-24 Thread Scott Barr
: Datasource err...pile of this... (too many beers...not enough time...) -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:31 PM To: 'Struts Users Mailing List' Subject: RE: Datasource err...pile of this -Original

Re: Datasource

2003-03-24 Thread Scott Barr
. Why does t - i - h - s comes out this? -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:42 PM To: 'Struts Users Mailing List' Subject: RE: Datasource err...pile of this... (too many beers...not enough time...) -Original

RE: Datasource

2003-03-24 Thread Mark Galbreath
hehe! -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:50 PM To: Struts Users Mailing List Subject: Re: Datasource I thought I'd stumbled onto a fishing mailing list, with those near references to carp :) Scott Barr www.exergonic.com.au

RE: Datasource

2003-03-24 Thread Andrew Hill
Looks like Mark's brain did a core dump... -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 March 2003 11:50 To: Struts Users Mailing List Subject: Re: Datasource I thought I'd stumbled onto a fishing mailing list, with those near references to carp

Re: Datasource

2003-03-24 Thread Kwok Peng Tuck
I usually pick number two (if you are refering to a jndi datasource) and leave the configuration to tomcat. So it's possible for me to move the apps to another app server without changing my sql code. Just have to configure the same datasource over in the new app server. Mark Galbreath wrote

RE: Datasource

2003-03-24 Thread Adam Sherman
. The Right Way(TM) 3. The Wrong Way(TM) 4. Actually, you need to declare a reference to 2 here. Not the actual Datasource 5. See 4. That help at all? Thanks, A. -- Adam Sherman Tritus CG Inc. http://www.tritus.ca/ +1 (613) 797-6819

Re: Datasource

2003-03-24 Thread Scott Barr
my connection code (which is used the Jakarta pooling stuff) to access a container managed connection. Scott Barr www.exergonic.com.au On Tue, 2003-03-25 at 14:35, Kwok Peng Tuck wrote: I usually pick number two (if you are refering to a jndi datasource) and leave the configuration to tomcat

DataSource references in Business Layer

2003-03-15 Thread Guido
Two simple questions. 1. I usally define all the datasources i need in struts-config.xml file. It is very easy, but how can I obtain a datasource reference in my business logic classes? I hate the idea of passing the reference to the business methods and I don't want to include all my business

Re: DataSource references in Business Layer

2003-03-15 Thread Dan Allen
You will inherit a method from Action called getDataSource() which I think you should look into. There is a method in action for just about every handler you would need, including getResources() saveMessages() saveErrors() getDataSource() etc.. Check out the API docs for Action. Dan -- - -

Re: DataSource references in Business Layer

2003-03-15 Thread David Graham
You can grab the datasource out of the ServletContext. Use JNDI or pass the DataSource to some ServiceFactory that your business layer can use. David From: Guido [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: DataSource references

Re: DataSource references in Business Layer

2003-03-15 Thread Guido
Thank you. I was searching in ActionServlet class instead of Action. Now the Eclipse IDE warning singal has disappear and I can sleep again :P On Sat, 15 Mar 2003, Dan Allen wrote: } You will inherit a method from Action called getDataSource() which I } think you should look into. There is a

Re: DataSource references in Business Layer

2003-03-15 Thread Dan Allen
Guido ([EMAIL PROTECTED]) wrote: Thank you. I was searching in ActionServlet class instead of Action. Now the Eclipse IDE warning singal has disappear and I can sleep again :P Can you sleep for me too? I have no time for that. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - -

RE: Database datasource runtime configuration

2003-03-08 Thread Jörg Maurer
2003 04:52 To: [EMAIL PROTECTED] Subject: Database datasource runtime configuration Hi, I am using the configuration of the datasource/database inside the struts-config.xml file. That 's been giving me some backwards. For example I wish to change the hostname after

RE: Database datasource runtime configuration

2003-03-08 Thread Marco Tedone
-Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 3:52 AM To: [EMAIL PROTECTED] Subject: Database datasource runtime configuration Hi, I am using the configuration of the datasource/database inside the struts-config.xml

Database datasource runtime configuration

2003-03-07 Thread Joao Araujo
Hi, I am using the configuration of the datasource/database inside the struts-config.xml file. That 's been giving me some backwards. For example I wish to change the hostname after installing the whole software. I, then, need to open the file and change the configuration for this. I

Use of Struts DataSource

2003-02-19 Thread shashi
Hi Please give me guidlines regarding use of struts datasource. Regards Shashi

Re: Use of Struts DataSource

2003-02-19 Thread Vladislav Kamensky
Please give me guidlines regarding use of struts datasource. http://jakarta.apache.org/struts/faqs/database.html Vlad. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Design and Datasource question

2003-02-05 Thread Tolle Krez
I am a newbie to struts and started with the struts-example application. And modified it a bit and learning.. . It looks like there are no separate model classes and all business logic exists in the Action classes itself. I am thinking of separate them. The Datasource settings are in my struts

Re: Design and Datasource question

2003-02-05 Thread Vic Cekvenich
Tolle Krez wrote: I am a newbie to struts and started with the struts-example application. And modified it a bit and learning.. . It looks like there are no separate model classes and all business logic exists in the Action classes itself. I am thinking of separate them. The Datasource settings

Re: Design and Datasource question

2003-02-05 Thread Tolle Krez
I dont think it is good practice to pass datasource from Action class to your business beans. http://marc.theaimsgroup.com/?l=struts-userm=104333643909577w=2 http://marc.theaimsgroup.com/?l=struts-userm=104182416102397w=2 I feel using JNDI to get datasource is the best choice. Others - i should

Re: Design and Datasource question

2003-02-05 Thread Christopher Willingham
arrangement in that container. - Original Message - From: Tolle Krez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 8:42 PM Subject: Re: Design and Datasource question I dont think it is good practice to pass datasource from Action

Accessing struts datasource outside action servlet

2003-02-05 Thread Dinesh Sampangi
Hi All, How can i access the datasource outside the action class. suppose i need a connection in a bean/other class where i need some pre population of data from the database.. any suggestion woul be a gr8 help. rgds, Dinesh

Re: Accessing struts datasource outside action servlet

2003-02-05 Thread David Graham
You can store the DataSource in JNDI. An easier way is to configure some kind of service layer with the datasource. David From: Dinesh Sampangi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Accessing struts datasource outside action

Using Struts Datasource withaout Servlet Context

2003-01-23 Thread Softwareentwicklung Hauschel
Hey all, i won't pass the datasource form servlet to backend, how can i get the datasource outside a servlet ? Fredy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]

Re: Using Struts Datasource withaout Servlet Context

2003-01-23 Thread David Graham
JNDI David From: Softwareentwicklung Hauschel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Using Struts Datasource withaout Servlet Context Date: Thu, 23 Jan 2003 16:37:16 +0100 Hey all, i won't pass

AW: Using Struts Datasource withaout Servlet Context

2003-01-23 Thread Softwareentwicklung Hauschel
: Using Struts Datasource withaout Servlet Context JNDI David From: Softwareentwicklung Hauschel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Using Struts Datasource withaout Servlet Context Date: Thu, 23

accessing DataSource, webapp design question

2003-01-22 Thread Charlie Toohey
This is more of a design question. I am using Struts and Tomcat, and have set up a JNDI ref-resource to acquire a DataSource for my database, which works fine. All of my value objects use the same database. The question is how to give each value object access to this DataSource. One option

Re: accessing DataSource, webapp design question

2003-01-22 Thread David Graham
with the DataSource so they can persist the objects. This removes all persistence code from the VOs and allows pluggable persistence layers. I'm using JDBC now but could move to EJB, OJB, JDO, etc very easily. David From: Charlie Toohey [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL

Re: accessing DataSource, webapp design question

2003-01-22 Thread Craig R. McClanahan
On Wed, 22 Jan 2003, Charlie Toohey wrote: Date: Wed, 22 Jan 2003 10:31:23 -0800 From: Charlie Toohey [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: accessing DataSource, webapp design question This is more of a design question. I

RE: linking a struts application to a jndi resource through a datasource

2003-01-07 Thread Mohan Radhakrishnan
: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 10:03 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: linking a struts application to a jndi resource through a datasource On 6 Jan 2003, Nick Torenvliet wrote: Date: 06 Jan 2003 22:46:26 -0500

RE: linking a struts application to a jndi resource through a datasource

2003-01-07 Thread Mohan Radhakrishnan
: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 10:03 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: linking a struts application to a jndi resource through a datasource On 6 Jan 2003, Nick Torenvliet wrote: Date: 06 Jan 2003 22:46:26 -0500 From

RE: linking a struts application to a jndi resource through a datasource

2003-01-07 Thread Craig R. McClanahan
application to a jndi resource through a datasource On 6 Jan 2003, Nick Torenvliet wrote: Date: 06 Jan 2003 22:46:26 -0500 From: Nick Torenvliet [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED

getting a datasource in a bean

2003-01-05 Thread Nick Torenvliet
Hi, Just as in the examples on the struts site I've succesfully configured a mysql datasource and had it print the results of queries from out of an action class. I am using struts 1.1-b2. I want to replace my current dbpooling(I wrote last year)with the struts datasource and dbcp, I am having

Re: getting a datasource in a bean

2003-01-05 Thread Max Kremer
You can just look up the JNDI datasource in your bean. - Original Message - From: Nick Torenvliet [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 05, 2003 4:51 PM Subject: getting a datasource in a bean Hi, Just as in the examples on the struts site I've succesfully

Re: getting a datasource in a bean

2003-01-05 Thread Nick Torenvliet
Sounds like a plan,I've never worked with javax.naming packages before though, I've got the following datasource data-source type=org.apache.commons.dbcp.BasicDataSource key=FIELDSTONE set-property property=autoCommit value=false/ set-property

Re: getting a datasource in a bean

2003-01-05 Thread Craig R. McClanahan
://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html The instructions for setting up your web.xml file, and for accessing the data source in a program, are portable across any container that supports JNDI based data sources. The administrative stuff to configure them is specific

Struts data-source vs. Tomcat JNDI registered DataSource

2003-01-03 Thread Charlie Toohey
as org.apache.commons.dbcp.BasicDataSourceFactory), registering the DataSource with a naming service based on JNDI ? I was planning on configuring a DataSource with JNDI in web.xml/server.xml for database access, but then noticed that struts-config.xml has a data-source entry. Any opinions ? - Charlie -- To unsubscribe, e

RE: Struts data-source vs. Tomcat JNDI registered DataSource

2003-01-03 Thread pqin
registered DataSource For those using Struts with Tomcat, Any advantage or difference in using a Struts data source based on the Jakarta Commons DataBase Connection Pool BasicDataSource class, vs. using the Tomcat data source using the Jakarta Commons DBCP and Pool (configuring factory

Re: Struts data-source vs. Tomcat JNDI registered DataSource

2003-01-03 Thread Craig R. McClanahan
On Fri, 3 Jan 2003, Charlie Toohey wrote: Date: Fri, 3 Jan 2003 12:09:29 -0800 From: Charlie Toohey [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts data-source vs. Tomcat JNDI registered DataSource For those using Struts

Re: datasource problem

2003-01-02 Thread David M. Karr
[EMAIL PROTECTED] Steven == Steven Dahlin [EMAIL PROTECTED] writes: Steven When I try to get a datasource which has been defined in the Steven struts-config.xml no matter what I do the datasource returns back null. My Steven struts-config.xml for data-sources

datasource problem

2003-01-01 Thread Steven Dahlin
When I try to get a datasource which has been defined in the struts-config.xml no matter what I do the datasource returns back null. My struts-config.xml for data-sources is: data-sources data-source key= conPool set-property property = autoCommit

conPool -- ConPool / Re: datasource problem

2003-01-01 Thread Liu Jian
Will the data-source key case-sensitive? conPool -- ConPool Try dsSrc= ( DataSource ) context.getAttribute( conPool ); Good luck ! - Original Message - From: Steven Dahlin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 01, 2003 3:42 PM Subject: datasource

Re: conPool -- ConPool / Re: datasource problem

2003-01-01 Thread Steven Dahlin
That was a misttype on my part. In the code both have conPool. - Original Message - From: Liu Jian [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, January 01, 2003 2:25 PM Subject: conPool -- ConPool / Re: datasource problem Will the data-source key

Re: datasource problem

2003-01-01 Thread David M. Karr
Steven == Steven Dahlin [EMAIL PROTECTED] writes: Steven When I try to get a datasource which has been defined in the struts-config.xml no matter what I do the datasource returns back null. My struts-config.xml for data-sources is: Steven data-sources Steven data

Re: datasource problem

2003-01-01 Thread Steven Dahlin
I am a little unclear what you mean by using modules? Steve - Original Message - From: David M. Karr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 01, 2003 3:45 PM Subject: Re: datasource problem Steven == Steven Dahlin [EMAIL PROTECTED] writes: Steven When I

FW: Digester - Config.xml - datasource

2002-12-19 Thread Mark
[EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Date: Thu, 19 Dec 2002 01:14:29 +0100 To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Digester - Config.xml - datasource Hello I'm wondering whether anyone has every used digester to read in properties from config.xml

Digester - Config.xml - datasource

2002-12-18 Thread Mark
anyone tried. Digester newdatasource = new Digester(); newdatasource . addObjectCreate(datasources/datasource, DataSource); newdatasource .AddSetProperty(struts-config/datasources/datasource/setproperty,key,my key²); newdatasource .AddSetProperty(struts-config/datasources/datasource/setproperty

Re: Oracle DataSource Tips

2002-12-17 Thread Mark
Hello I'm using oracle as my datsource as well, I haven't had this problem but that in my earlier posting.. So who do you reference the datasource specifed in config.xml in business logic classes. The docs recommend this seperation but provide no clear way of doing this, am i missing something

Re: Oracle DataSource Tips

2002-12-17 Thread Bradley G Smith
, and require Struts 1.1. The beans can do the business logic processing as needed. The plug-in has access to the servlet context so can access the datasource defined in struts-config.xml or in the servlet container configuration file(s). Brad

Oracle DataSource Tips

2002-12-16 Thread Bradley G Smith
Since it took me several hours to catch this bug, I thought I might pass it along to anyone using Oracle as a datasource for the Struts application. The OracleDatSource and OraclePooledConnectionDataSource classes use standard Bean naming conventions for getters and setters. The url property

Re: Oracle DataSource Tips

2002-12-16 Thread Bradley G Smith
] cc: d.usSubject: Oracle DataSource Tips

Re: Multiple DataSource Problem

2002-12-06 Thread tbachta
] ail.com cc: Subject: Re: Multiple DataSource Problem

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

Re: Multiple DataSource Problem

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

Re: Multiple DataSource Problem

2002-12-06 Thread David Graham
Ok, post your entire data-sources 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

Re: Multiple DataSource Problem

2002-12-06 Thread tbachta
] ail.com cc: Subject: Re: Multiple DataSource Problem

Re: Multiple DataSource Problem

2002-12-06 Thread David Graham
: [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 data-sources data-source key=MRA set-property property=driverClass value

Multiple DataSource Problem

2002-12-05 Thread tbachta
/ set-property property=user value=info_user/ set-property property=password value=info_user/ /data-source /data-sources try { ServletContext context = servlet.getServletContext(); DataSource dataSource = (DataSource

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

Re: Multiple DataSource Problem

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

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

Re: Multiple DataSource Problem

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

Re: Multiple DataSource Problem

2002-12-05 Thread David Graham
data-source key=org.apache.struts.action.DATA_SOURCE 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

DataSource

2002-11-27 Thread Jim Bruno Goldberg
Hi, people! Someone can send me a example class with DataSource access defined on struts-config? How can I do this? I don find any examples on struts files.. Thanks again. -- CUL8R,[]s Jim Bruno Goldberg http://www.prosites.com.br -- To unsubscribe, e-mail: mailto

Re: DataSource

2002-11-27 Thread Gemes Tibor
2002. november 27. 12:49 dátummal Jim Bruno Goldberg ezt írtad: Hi, people! Someone can send me a example class with DataSource access defined on struts-config? How can I do this? I don find any examples on struts files.. Thanks again. Reading the docs? http

Re: DataSource

2002-11-27 Thread Jim Bruno Goldberg
I try this code, but I dont work because I don known where is dataSource. Can someone a .java complete (with imports)? Thanks a lot. Gemes Tibor wrote: 2002. november 27. 12:49 dátummal Jim Bruno Goldberg ezt írtad: Hi, people! Someone can send me a example class

Re: DataSource

2002-11-27 Thread David Graham
This is from a PlugIn that has access to the ActionServlet, modify accordingly: DataSource ds = (DataSource) servlet.getServletContext().getAttribute(Globals.DATA_SOURCE_KEY); David From: Jim Bruno Goldberg [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts

Re: DataSource

2002-11-27 Thread Mark
= theForm.getPassword(); String company = theForm.getCompany(); try { DataSource dataSource = servlet.findDataSource(null); Connection conn = dataSource.getConnection(); String query = SELECT

Utilizing the Struts DataSource from a listener

2002-11-16 Thread Paul Idusogie
Hello: I am attempting to write information to a database using a connection obtained through a dataSource. Could anyone provide the best approach to write to a database from a session listener. I have attempted retrieving the datasource from the servlet context using the following code snippet

accessing DataSource from custom tag

2002-11-05 Thread Andrew
is there any way to access the DataSource defined in struts-config.xml from within a custom tag. i usually get it from the ActionServlet context attribute Action.DATA_SOURCE_KEY from within an Action. but its not defined in the pageContext of a tag, so i assume its not easy to do, though i saw

Re: accessing DataSource from custom tag

2002-11-05 Thread Mike Way
Andrew, pageContext.getServletContext().getAttribute( But, do you really want to do this ? Mike At 02:53 05/11/2002 -0800, you wrote: is there any way to access the DataSource defined in struts-config.xml from within a custom tag. i usually get it from the ActionServlet context

Re: accessing DataSource from custom tag

2002-11-05 Thread Kevin . Bedell
PROTECTED] on 11/05/2002 06:04:22 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:Re: accessing DataSource from custom tag Andrew, pageContext.getServletContext

Re: accessing DataSource from custom tag

2002-11-05 Thread Andrew
Mailing List [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:Re: accessing DataSource from custom tag Andrew, pageContext.getServletContext().getAttribute( But, do you really want to do this ? Mike At 02:53 05/11/2002 -0800, you wrote

How to configure Datasource externally

2002-11-04 Thread Kwon Yu
Hello...everyone Does anyone know how to configure datasource externally like using a class? In Struts, I use struts-config.xml file to configure datasource. However, how do I configure datasource from a class and make it available when web application start. Thanks in advance

Re: How to configure Datasource externally

2002-11-04 Thread David Graham
You can create a DataSource in a plugin or the ActionServlet and store it in the ServletContext for later retrieval. David From: Kwon Yu [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: How to configure Datasource externally Date: Mon

<    1   2   3   4   >