Struts2 - Using java.util.Map as datasource in the jasperreports

2013-07-29 Thread Omar Ngarigari
Hello, I was able to generate a PDF file using struts2-jasperreports-plugin using java.util.List as datasource. However, I am not able to do the same with the java.util.Map datasource. My question is anybody knows how to use java.util.Map datasource in the struts2-jasperreports-plugin

Re: Struts DataSource Feature

2011-08-29 Thread Dave Newton
It's been deprecated for a long time because there are non-Struts ways to achieve the same functionality. I wouldn't use it. Dave On Monday, August 29, 2011, Anjib Mulepati wrote: > Is Struts DataSource Feature still worth using. I am on Struts 1.3.8. > I heard it will be rem

Struts DataSource Feature

2011-08-29 Thread Anjib Mulepati
Is Struts DataSource Feature still worth using. I am on Struts 1.3.8. I heard it will be removed from Struts eventually. Any updates? Thanks, Anjib - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Datasource object in any class

2010-07-14 Thread abhishek jain
Hi friends, I have an application in which there is a Cart object which i need to save in session, as it is to be saved in session, i cannt store a reference of datasource in the Cart. (as i believe it is not serializable). I need to know is there a way by which the datasource is available

Re: How to Configure a DataSource in Struts 2.X

2010-05-31 Thread aum strut
t; How do we configure a Datasource in Struts 2.X. > 1. Do we put Driver and url in the Action Class file or > 2. Do we configure the Driver and Url in the Web.xml or > 3. Do we configure in struts.xml instead of web.xml. > > A Small example would be helpful. &g

How to Configure a DataSource in Struts 2.X

2010-05-31 Thread VR Venugopal Rao
Dear All, How do we configure a Datasource in Struts 2.X. 1. Do we put Driver and url in the Action Class file or 2. Do we configure the Driver and Url in the Web.xml or 3. Do we configure in struts.xml instead of web.xml. A Small example would be helpful. Regards, VR Venugopal Rao

Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic
> --- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > >> From: Milan Milanovic <[EMAIL PROTECTED]> >> Subject: Re: JasperReports Plugin datasource >> To: user@struts.apache.org >> Date: Friday, November 21, 2008, 11:49 AM >> Dave, >>

Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
A patch file would be better, but I can do it this way too. --- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > From: Milan Milanovic <[EMAIL PROTECTED]> > Subject: Re: JasperReports Plugin datasource > To: user@struts.apache.org > Date: Friday, November 2

Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic
D] > > > -- View this message in context: http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20625106.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EM

Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
--- On Fri, 11/21/08, Milan Milanovic wrote: > O.K. Where can I do this ? On the S2 JIRA at: https://issues.apache.org/struts/secure/Dashboard.jspa (I think) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic
Dave, newton.dave wrote: > >> I added connection param to the JR result and now it works perfectly >> :-)! If connection is found, dataSource is not used. > > Glad to hear it. If you want, you could create a patch and a JIRA and I'll > apply it to the JR result

Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
dded connection param to the JR result and now it works perfectly > :-)! If connection is found, dataSource is not used. Glad to hear it. If you want, you could create a patch and a JIRA and I'll apply it to the JR result and finish some

Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic
Hi Dave, I found what is the problem. Query that JR report run returned no rows, so it show it like empty. I added connection param to the JR result and now it works perfectly :-)! If connection is found, dataSource is not used. Great job, thanks! -- Milan newton.dave wrote: > > ---

Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
--- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I managed to call fillReport with open Connection object, > but I just get an empty report page?! If I try to pass Connection object > as dataSource in JR result, then I get that exception that Connection is &

Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic
I managed to call fillReport with open Connection object, but I just get an empty report page?! If I try to pass Connection object as dataSource in JR result, then I get that exception that Connection is null and I see report contents but with null values ? -- Milan newton.dave wrote

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote: > Yes, I understand. But who needs that?! Lots of people. Many JR reports are simply well-formatted tabular data which is trivially represented by a list, potentially of composite objects. In fact that's all I've ever used it for over a half-decade.

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
n property as the > data source. If you're not going to do that then the JR result may not be > of much benefit to you. > > Dave > > > --- On Thu, 11/20/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > >> From: Milan Milanovic <[EMAIL PROTECTED]> >&g

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
Milanovic <[EMAIL PROTECTED]> wrote: > From: Milan Milanovic <[EMAIL PROTECTED]> > Subject: Re: JasperReports Plugin datasource > To: user@struts.apache.org > Date: Thursday, November 20, 2008, 1:25 PM > I found what is the problem. In JasperReportsResult > doExecut

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
I found what is the problem. In JasperReportsResult doExecute() method you call report in this way: jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, stackDataSource); where : ValueStackDataSource stackDataSource = new ValueStackDataSource(stack, dataSource); But my

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
of my >> action class is not null in action method which show report. >> Why my Connection is null, do you have any idea ? > > Not off the top of my head, but I'm not sure how you're trying to use it. > The JR plugin's "dataSource" config element

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
report. > Why my Connection is null, do you have any idea ? Not off the top of my head, but I'm not sure how you're trying to use it. The JR plugin's "dataSource" config element is meant to be a collection that will be displayed by the report. If you're pass

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
ath? >> >> Dave >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- Vie

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
e the original S2.0 JR plugin on your classpath? > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/JasperReports-Plugin

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote: > when I copied this class to my project, it say that I > don't have these two classes: ValueStackDataSource and > ValueStackShadowMap. Should I copy them too ? Hmm, maybe so--the work I did on this was awhile ago so I don't really recall. Do you have

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
ibe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20604349.html Sent from the Struts - User mailing list archive at Nabble.com. -

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote: > Great Dave! Thanks very much. This is very helpful for anyone who > deals with business applications that includes S2 and JR. Keep me posted and let me know if there are other JR needs. Dave

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
s.apache.org/2.x/docs/result-types.html > [3] http://struts.apache.org/2.x/docs/result-configuration.html > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote: > O.K. Thank you. Please, send me that class or a link to > S2.1 source where can I find it. Use [1] and cut-and-paste, or follow the standard checkout process and copy it into your project. > Just one more thing, how can I include this class in my >

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
essage in context: http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20603103.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
Actually, just use the S2.1 jasper result, IIRC I didn't do anything in particular for the S2.1 version, and (believe it or not) it's cleaner than the version I would have emailed you--our in-house version is structurally quite different, the S2.1 version doesn't have the same extreme changes (a

Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote: > Does ANYONE know how to pass parameters to report in Struts > 2 when JasperReportsResult is used ?! I will send you a sanitized version of my custom JR result, or you can just look in the S2.1 source where the patch has been applied. Dave

Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic
Does ANYONE know how to pass parameters to report in Struts 2 when JasperReportsResult is used ?! Milan Milanovic wrote: > > Hi, > > I want to use JasperReports from my Struts 2 app. But I have a problem > with datasource param. I want to pass Connection object (created o

Re: JasperReports Plugin datasource

2008-11-19 Thread Milan Milanovic
wrote: >> I want to use JasperReports from my Struts 2 app. But I >> have a problem with datasource param. I want to pass >> Connection object (created or if possible >> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...> >> sp

Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Dear Dave, I'm not sure how to use this. Can you please show an example ? -- Milan newton.dave wrote: > > --- On Tue, 11/18/08, Milan Milanovic wrote: >> I want to use JasperReports from my Struts 2 app. But I >> have a problem with datasource param. I want to pas

Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Dear Dave, as far as I can see, I can pass Connection object as dataSource parameter from my action class ? Altough I don't know how to pass dataSource bean from Spring configuration. But, it seems that JR result type use parameters from value stack that can be used directly in report (wi

Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Dear Dave, as far as I can see, I can pass Connection object as dataSource parameter from my action class ? Altough I don't know how to pass dataSource bean from Spring configuration. But, it seems that JR result type use parameters from value stack that can be used directly in report (wi

Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Dear Dave, as far as I can see, I can pass Connection object as dataSource parameter from my action class ? Altough I don't know how to pass dataSource bean from Spring configuration. But, it seems that JR result type use parameters from value stack that can be used directly in report (wi

Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Dear Dave, as far as I can see, I can pass Connection object as dataSource parameter from my action class ? Altough I don't know how to pass dataSource bean from Spring configuration. But, it seems that JR result type use parameters from value stack that can be used directly in report (wi

Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Dear Dave, I'm not sure how to do this. Please, give me an example. -- Thank you in advance, Milan newton.dave wrote: > > --- On Tue, 11/18/08, Milan Milanovic wrote: >> I want to use JasperReports from my Struts 2 app. But I >> have a problem with datasourc

Re: JasperReports Plugin datasource

2008-11-18 Thread Dave Newton
--- On Tue, 11/18/08, Milan Milanovic wrote: > I want to use JasperReports from my Struts 2 app. But I > have a problem with datasource param. I want to pass > Connection object (created or if possible > class="org.springframework.jdbc.datasource.DriverManagerDataSource"..

JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic
Hi, I want to use JasperReports from my Struts 2 app. But I have a problem with datasource param. I want to pass Connection object (created or if possible spring bean) as a parameter and not a list, because my report doesn't need any input list (it get data directly from database), I just

Re: [S2] ArrayList of Object as datasource in JasperReports

2008-01-02 Thread dasariprasad
file uploaded prasad DTR carmi_cd wrote: > > > I need a tutorial that uses ArrayList of Object as datasource > for JasperReports..do you know any? > http://www.nabble.com/file/p14590214/JasperReports-struts2.doc JasperReports-struts2.doc -- View this message in

Fw: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread Martin Gainty
can we see your copy of apps/reports/templates/hr004.jrxml M-- - Original Message - From: "carmi_cd" <[EMAIL PROTECTED]> To: Sent: Thursday, November 08, 2007 8:31 PM Subject: Re: [S2] ArrayList of Object as datasource in JasperReports > > here is t

Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread carmi_cd
1,2003"); >> Personnel p2=new Personnel(); >>p2.setSurname("Cruz"); >>p2.setFirstname("Miguel"); >>p2.setExamcode("CSC222"); >>p2.setExamdate("December 2,2003"); >>rep

Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread j alex
tExamcode("CSC222"); >p2.setExamdate("December 2,2003"); >reportData.add(p1); >reportData.add(p2); >} > > } > > here is part of my struts.xml > > >/apps/reports/ReportNotFound.jsp > >

Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-07 Thread carmi_cd
; > http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was able > to use this as-is and get a report fine. > > -Joseph > > > carmi_cd wrote: >> >> >> I need a tutorial that uses ArrayList of Object as datasource >>

Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-07 Thread strutstwouser
http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was able to use this as-is and get a report fine. -Joseph carmi_cd wrote: > > > I need a tutorial that uses ArrayList of Object as datasource > for JasperReports..do you know any? > -- View this mes

[S2] ArrayList of Object as datasource in JasperReports

2007-11-04 Thread carmi_cd
I need a tutorial that uses ArrayList of Object as datasource for JasperReports..do you know any? -- View this message in context: http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13580062 Sent from the Struts - User mailing list archive at

Re: [S2]Datasource is null in JasperReports integration

2007-11-01 Thread carmi_cd
; wrote: >> >> >> i'm new in integrating JasperReports and Struts 2..my problem is its >> always >> saying that my datasouce is >> null so it displays a pdf file with all the labels in it without anything >> on >> the detail part..my datasource &

Re: [S2]Datasource is null in JasperReports integration

2007-10-26 Thread j alex
aying that my datasouce is > null so it displays a pdf file with all the labels in it without anything > on > the detail part..my datasource > is an ArrayList of Personnel object, i name it reportData. > > here is part of my code.. > > > public class EIS_HR_004_JASP

[S2]Datasource is null in JasperReports integration

2007-10-26 Thread carmi_cd
i'm new in integrating JasperReports and Struts 2..my problem is its always saying that my datasouce is null so it displays a pdf file with all the labels in it without anything on the detail part..my datasource is an ArrayList of Personnel object, i name it reportData. here is part of my

[S2] JasperReports and Struts2 DataSource was null error

2007-10-25 Thread carmi_cd
i'm new in integrating JasperReports and Struts 2..my problem is its always saying that my datasouce is null so it displays a pdf file with all the labels in it without anything on the detail part..my datasource is an ArrayList of Personnel object, i name it reportData. here is part of my

Re: Struts HELP - DAO, Datasource and Displaying Data

2006-12-29 Thread Laurie Harper
: http://myhost/myapp/myaction.do and in struts-config.xml Hi current am using a struts datasource and a data access object. When a jsp page is accessed I want to be able to store the rows of the database in an array and iterate them back out to the jsp page. The Action class can be f

Struts HELP - DAO, Datasource and Displaying Data

2006-12-25 Thread Mike1948
>From everything that I have read the action class gets called in the event of a form being submitted for example. However, I do not want any form to be processed, just when the jsp page is accessed the action class is called. Hi current am using a struts datasource and a data access object. Wh

Re: datasource creation problem?

2006-12-09 Thread Chris Pratt
ns-dbcp.jar to build path. > > - Original Message - > From: "Mallik" <[EMAIL PROTECTED]> > To: > Sent: Monday, December 04, 2006 3:22 PM > Subject: datasource creation problem? > > >> >> Hi friends >> i started my

Re: datasource creation problem?

2006-12-04 Thread Mallik
> Sent: Monday, December 04, 2006 3:22 PM > Subject: datasource creation problem? > > >> >> Hi friends >> i started my application in Struts using IDE Eclipse. >> when i create datasource like this: >> >> >> > value="oracle.jdbc.driver.O

Re: datasource creation problem?

2006-12-04 Thread Venkata Phani Kumar
Hi mallik, just try by adding commons-dbcp.jar to build path. - Original Message - From: "Mallik" <[EMAIL PROTECTED]> To: Sent: Monday, December 04, 2006 3:22 PM Subject: datasource creation problem? > > Hi friends > i started my application in Struts us

datasource creation problem?

2006-12-04 Thread Mallik
Hi friends i started my application in Struts using IDE Eclipse. when i create datasource like this: in struts-config.xml i am getting the error: java.lang.ClassNotFoundException

Re: How to use Jboss datasource in struts-config.xml

2006-11-09 Thread Antonio Petrelli
Venkata Phani Kumar ha scritto: Hi, I have created a datasource which will bind to a jndi name. Now i want to use the same datasource in my struts application. For this i need to mention the same jndi name in my struts-config.xml. can any body help me out how to mention the jndi name in

How to use Jboss datasource in struts-config.xml

2006-11-09 Thread Venkata Phani Kumar
Hi, I have created a datasource which will bind to a jndi name. Now i want to use the same datasource in my struts application. For this i need to mention the same jndi name in my struts-config.xml. can any body help me out how to mention the jndi name in struts-config.xml Thanks

[OT] Re: Using websphere datasource in Struts

2006-08-22 Thread Antonio Petrelli
Shyamsunder Reddy ha scritto: What is the best place to call Websphere DataSource in Struts application. Eheh, it's not so simple :-) Instantiate it when ActionServlet is loaded and then pass onto Model classes as reference ABSOLUTELY NOT! OR create a static class that instantiate

Using websphere datasource in Struts

2006-08-22 Thread Shyamsunder Reddy
What is the best place to call Websphere DataSource in Struts application. Instantiate it when ActionServlet is loaded and then pass onto Model classes as reference OR create a static class that instantiates the DataSource and getConnections from this class which should be Singleton

Re: Error while configure struts Datasource

2006-04-04 Thread Antonio Petrelli
red phoenix ha scritto: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource Google is your friend. Search: org.apache.commons.dbcp.BasicDataSource The first result is a javadoc page, the second if the homepage of Jakarta Commons DBCP: http://jakarta.apache.org/commons

Error while configure struts Datasource

2006-04-01 Thread red phoenix
I want to configure data source,I use Tomcat5.5.15 and struts-1.2.9,my database is Microsoft Access2000,my configure is follows: . When I start Tomcat,it raise following error: New org.apache.commons.dbcp.BasicDataSource Begin event threw excepti

dynamic usernames and passwords in a DataSource

2006-03-01 Thread Andy Hammer
My DataSource is static in the struts-config.xml file. After I validate a user, I want to use thier username and password in a DataSource. Is there any way to change these properties dynamically? Andy __ Do You Yahoo!? Tired of spam? Yahoo! Mail

how to use Tomcat datasource inside a servlet

2006-01-27 Thread Legolas Woodland
Hi thank you for reading my post. I defined a data-source in tomcat administration console. now i want to use this data source inside my servlet how i can do that ? Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: what is diffrent between Struts Datasource and Tomcat datasource

2005-12-26 Thread Craig McClanahan
cated in 1.1, and > > removed in 1.2. > > > > Craig > > > > > > Thank you for reply. > If i want to use Tomcat Data-source , tomcat must have my jdbc driver in > its shared lib folder (is it true?) See the Tomcat documentation for precise requirements. For e

Re: what is diffrent between Struts Datasource and Tomcat datasource

2005-12-26 Thread Legolas Woodland
Craig McClanahan wrote: On 12/26/05, Legolas Woodland <[EMAIL PROTECTED]> wrote: Hi thank you for reading my post. we can define data-source inside Struts-config.xml also it is possible to define a data-source in tomcat admin page. no my question is : what is differences between them , are th

Re: what is diffrent between Struts Datasource and Tomcat datasource

2005-12-26 Thread Craig McClanahan
On 12/26/05, Legolas Woodland <[EMAIL PROTECTED]> wrote: > > Hi > thank you for reading my post. > we can define data-source inside Struts-config.xml > also it is possible to define a data-source in tomcat admin page. > no my question is : > what is differences between them , are they the same ? >

what is diffrent between Struts Datasource and Tomcat datasource

2005-12-26 Thread Legolas Woodland
Hi thank you for reading my post. we can define data-source inside Struts-config.xml also it is possible to define a data-source in tomcat admin page. no my question is : what is differences between them , are they the same ? Which requirement each of this data-source has ? Thank you

RE: Load datasource config without action classes

2005-10-21 Thread R.Vijayaraghavan
Configure a JNDI data-source. Different application servers do it differently. regards, vijay. > -Original Message- > From: M4RC0 [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 18, 2005 4:22 PM > To: Struts Users Mailing List > Subject: Load datasource config without

Load datasource config without action classes

2005-10-18 Thread M4RC0
Hi i'm thinking about loading struts-config datasources configuration directly to my business classes, but i appears to be necesary to use action clases (by calling getDataSource method). is it possible to use a load-on-startup servlet to get struts configured datasources (or something similar, in

Re: Datasource not found by Plugin on startup

2005-10-03 Thread Martin Gainty
) initCtx.lookup("java:comp/env"); if(envCtx == null ) throw new Exception("Boom - No Environment Context"); // the following matches the resource name defined in foo.xml DataSource ds = (DataSource) envCtx.lookup("jdbc/sampdb"); http://forums.devshed.com/archive/t-120081 Plea

Datasource not found by Plugin on startup

2005-10-03 Thread Faisal Mahmoud
Hi, I have written a plugin for a Struts app which accesses a DB connection via a datasource. The datasource is defined in the Tomcat server.xml file, and is loaded via a library we wrote. I know the datasource works fine because I can access if from other classes in the app. But when I start up

Re: Storing DataSource and ServletContext in the service layer

2005-09-23 Thread Craig McClanahan
On 9/23/05, emre akbas <[EMAIL PROTECTED]> wrote: > > Yes, to me too, getting datasource and then connection and passing this > connection object to the service layer does not seem to be a good pattern. > I > said, by storing the datasource and servletcontext statically in

Re: Storing DataSource and ServletContext in the service layer

2005-09-23 Thread emre akbas
Yes, to me too, getting datasource and then connection and passing this connection object to the service layer does not seem to be a good pattern. I said, by storing the datasource and servletcontext statically in the service layer may make life easier. I want to know various opinions about this

Re: Storing DataSource and ServletContext in the service layer

2005-09-23 Thread Lixin Chu
> > i think if you use Spring Framework or something similar, you might not > need to do this by yourself. action class accessing DB does not seem to be a good pattern.

Storing DataSource and ServletContext in the service layer

2005-09-23 Thread emre akbas
Hi all, I sometimes need to access the datasource within the service layer and by default only Action classes have access to it. In order to solve this issue, I plan to write a plugin which will get the datasource and the servletcontext at startup and store them in the service layer as static

Re: access the DataSource in a plugin object

2005-09-14 Thread Martin Gainty
actually if we are adhering to 'Struts' way of acquiring the DataSource Action class has a getDataSource which takes a request parameter (and optional 2nd param of key for multiple data-sources) http://struts.apache.org/api/org/apache/struts/action/Action.html#get

Re: access the DataSource in a plugin object

2005-09-14 Thread Thibaut Lassalle
hi i have the solution DataSource aDataSource = (DataSource) actionServlet.getServletContext().getAttribute("dataBase1"); i found the solution here http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=001155 Thank you, Thibaut Lassalle Martin Gainty

Re: access the DataSource in a plugin object

2005-09-13 Thread Martin Gainty
Hello Thibault You will want to set this up in your init method of your plugin so if your DataSource is setup with a key parameter is already identified as "database1" key="dataBase1"> value="org.gjt.mm.mysql.Driver" /> valu

Re: access the DataSource in a plugin object

2005-09-13 Thread Thibaut Lassalle
ts1.2/documentation/ja/target/faqs/database.html /*for a single DataSource*/ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { javax.sql.DataSource dataS

Re: access the DataSource in a plugin object

2005-09-13 Thread Martin Gainty
Thibault- /*This is straight from the Struts doc available at*/ http://www.jajakarta.org/struts/struts1.2/documentation/ja/target/faqs/database.html /*for a single DataSource*/ public ActionForward execute(ActionMapping mapping, ActionForm form

access the DataSource in a plugin object

2005-09-13 Thread Thibaut Lassalle
hi I would like to access the DataSource object from a plugin in my Struts application. I use struts 1.2 with modules. In the root struts-config.xml the data source is discribe as : key="dataBase1"> value="org.gjt.mm.mysql.Driver" /> value="jd

Problems acceding a datasource

2005-08-05 Thread Gonzalez Aleksander
Hi, I have this in struts-congig.xml and here the error i get 5-08-05 13:54:30 StandardContext[/DIDE]Servlet /DIDE threw load() exception javax.servlet.UnavailableException: Parsing error processing resource path

DataSource Error

2005-06-27 Thread EROL TEZCAN
Hi, I upgrade my struts 1.1 files to struts 1.2.7. When I used struts 1.1 , I can get a connection with DataSource in struts-config.xml like that codes: struts-config.xml in java files

Re: access to dataSource configured in struts-config.xml in a Plugin

2005-06-06 Thread Thibaut Lassalle
thank you for your help. I find the solution. To access to database in a plugin method you can do: javax.sql.DataSource aDataSource = (DataSource)servletc.getServletContext().getAttribute("dataBase1"); where dataBase1 is the key witch identify the data-source in the struts-

Re: access to dataSource configured in struts-config.xml in a Plugin

2005-06-06 Thread Martin Gainty
found in the config file Is there a specific plugin you wish to use? Bonne Chance, Martin- - Original Message - From: "Thibaut Lassalle" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, June 06, 2005 10:20 AM Subject: access to dataS

access to dataSource configured in struts-config.xml in a Plugin

2005-06-06 Thread Thibaut Lassalle
hi, i'd like to access to dataSource configured in struts-config.xml in the Plugin init method. But i don't have a clue how to do that. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

access to dataSource configured in struts-config.xml in a Plugin

2005-06-01 Thread Thibaut Lassalle
hi, i'd like to access to dataSource configured in struts-config.xml in the Plugin init method. But i don't have a clue how to do that. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: DataSource........

2005-03-11 Thread Vamsee Kanakala
K Rajesh wrote: i have one doubt. Connection Pooiling only possible thro' JSTL http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html HTH, Vamsee. - To unsubscribe, e-mail: [EMAIL PROTECTED

DataSource........

2005-03-10 Thread K Rajesh
i have one doubt. Connection Pooiling only possible thro' JSTL

Re: DataSource in

2005-03-10 Thread brenmcguire
I don't know if it is correct or not, but it is the way the internal datasource manager in Struts behaves. Anyway I wrote a plugin that "should" behave better: http://sdsmanager.sourceforge.net/ I must say that using DataSource as part of a web application is not a good practice

DataSource in

2005-03-09 Thread Jean Stamm
Hello, In a Struts app I use the standard DataSource interface to implement the connection pooling to my DB. I use it in my Actions, calling getDataSource with the request as argument like getDataSource(request, "datasourcename"). I also have a plug-in which puts an array of be

[OT] RE: Calling a datasource

2005-02-16 Thread Brian McGovern
Thanks for the reply. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 10:34 AM To: Struts Users Mailing List Subject: Re: Calling a datasource The resource-ref element in your web.xml file decouples the web app from the actual resource

Re: Calling a datasource

2005-02-16 Thread Erik Weber
y you are not hard-wiring it to a specific JNDI server's resource name. Erik Brian McGovern wrote: In my server config file I have a data resource "jdbc/MyData" and in my data layer i call it like this. DataSource zDataSource = (javax.sql.DataSource)zContext.lookup("jdbc/My

Re: Calling a datasource

2005-02-16 Thread Jim Kennedy
There is a standard way to do this Brian, but this is not a Struts question. This is a Struts only list. -Original Message- From: Brian McGovern <[EMAIL PROTECTED]> Sent: Feb 16, 2005 9:23 AM To: Struts Users Mailing List Subject: Calling a datasource In my server config file

Calling a datasource

2005-02-16 Thread Brian McGovern
In my server config file I have a data resource "jdbc/MyData" and in my data layer i call it like this. DataSource zDataSource = (javax.sql.DataSource)zContext.lookup("jdbc/MyData"); This works, but I dont want to hardcode the jdbc name in the data class. How and where do

Re: Struts and datasource

2004-11-03 Thread Erik Weber
duction-bin.jar), and servlet-api.jar, belong in $TOMCAT_HOME/common/lib. Is that where they are? Hope that helps, Erik Philippe PONSONNET wrote: Hello, I try to use a datasource in the struts-config.xml The file : value="org.apache.commons.

Struts and datasource

2004-11-03 Thread Philippe PONSONNET
Hello, I try to use a datasource in the struts-config.xml The file

  1   2   >