Re: [Struts 2] Database access [solved!]

2007-01-22 Thread plegal
It works ! Thanks for everybody's help ! The Struts 2 + Spring 2 + JPA + AJAX works with the Struts 2.04 version (not with the 2.01 because of tags problem) http://cwiki.apache.org/S2WIKI/struts-2-spring-2-jpa-ajax.html I've solve another problem of the tutorial : the table is quickstart.Person a

Re: [Struts 2] Database access

2007-01-22 Thread Don Brown
Another example is the dbportlet archetype. It uses Spring and its JDBC template for DB access. It can be ran as a servlet or portlet app. See http://struts.apache.org/2.x/docs/struts-maven-archetypes.html Don On 1/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, After some reading

Re: [Struts 2] Database access

2007-01-22 Thread plegal
Hi, After some reading in the mailing list I decided to upgrade to struts2.04 for api, core and spring-plugin. Now I have the following error when I launch the Struts2+Spring2+Ajax tutorial application (quickstart). Any idea ? Philippe INFO: Root WebApplicationContext: initialization complete

RE: [Struts 2] Database access

2007-01-22 Thread Dave Newton
That certainly was a lot of the log :/ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > GRAVE: "Servlet.service()" pour la servlet jsp a généré une exception > org.apache.jasper.JasperException: /index.jsp(44,4) L'attribut targets > est incorrect pour le tag submit d'après la TLD indiquée A ba

Re: [Struts 2] Database access

2007-01-22 Thread plegal
tanislav a écrit: > > > in java action class you can also connect through struts db mechanisam: > > > DataSource dataSource = (DataSource) > > > context.getAttribute("org.apache.struts.action.DATA_SOURCE"); conn = > > > dataSource.getConnection(); &

Re: [Struts 2] Database access

2007-01-16 Thread Stanislav
ts Users Mailing List" Subject: Re: [Struts 2] Database access Date: Tue, 16 Jan 2007 13:08:05 +0100 - Original Message Follows - > Hi, > > Thanks again. > Is it possible that you give me the complete listing of this example because, > I've problem to find how

Re: [Struts 2] Database access

2007-01-16 Thread Joe Germuska
e,ConnectionPass >word); > > > > From: Philippe Le Gal <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Subject: Re: [Struts 2] Database access > Date: Tue, 16 Jan 2007 11:08:28 +0100 > > - Original Message Follows - > > > Hi, &

Re: [Struts 2] Database access

2007-01-16 Thread Philippe Le Gal
tionPass >word); > > > > From: Philippe Le Gal <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Subject: Re: [Struts 2] Database access > Date: Tue, 16 Jan 2007 11:08:28 +0100 > > - Original Message Follows - > > > Hi, > >

Re: [Struts 2] Database access

2007-01-16 Thread Stanislav
nectionURL,ConnectionUserName,ConnectionPassword); From: Philippe Le Gal <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: Re: [Struts 2] Database access Date: Tue, 16 Jan 2007 11:08:28 +0100 - Original Message Follows - > Hi, > > Thanks for the information. >

Re: [Struts 2] Database access

2007-01-16 Thread Philippe Le Gal
lippe Le Gal <[EMAIL PROTECTED]> > To: user@struts.apache.org > Subject: [Struts 2] Database access > Date: Tue, 16 Jan 2007 10:53:12 +0100 > > - Original Message Follows - > > > Hi, > > > > I'm looking for a simple struts 2 database access example.

re: [Struts 2] Database access

2007-01-16 Thread Stanislav
in struts-config for sql database. From: Philippe Le Gal <[EMAIL PROTECTED]> To: user@struts.apache.org Subject: [Struts 2] Database access Date: Tue, 16 Jan 2007 10:53:12 +0100 - Or

[Struts 2] Database access

2007-01-16 Thread Philippe Le Gal
Hi, I'm looking for a simple struts 2 database access example. Thanks for any url Philippe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Database Access

2006-01-19 Thread Larry Meadors
Interesting note: iBATIS was in the top 3 for JDJ's "Best Java Persistence Architecture". http://jdj.sys-con.com/read/171303_3.htm Larry On 1/19/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > Asad Habib wrote the following on 1/19/2006 10:10 AM: > > What are the different ways in designing the p

RE: [OT] Re: Database Access

2006-01-19 Thread Frank W. Zammetti
t > http://idiacomputing.com/moin/JdbcPersistence > > - George > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] >> Sent: Thursday, January 19, 2006 10:17 AM >> To: Struts Users Mailing List >> Subject: [OT] Re: Dat

RE: [OT] Re: Database Access

2006-01-19 Thread George.Dinwiddie
[mailto:[EMAIL PROTECTED] > Sent: Thursday, January 19, 2006 10:17 AM > To: Struts Users Mailing List > Subject: [OT] Re: Database Access > > > It appears that you're still a student and you've asked for a > "...simple > way to access a database."

[OT] Re: Database Access

2006-01-19 Thread DGraham
r has a nice article you might be interested in: http://www.ambysoft.com/essays/persistenceLayer.html -Dennis Asad Habib <[EMAIL PROTECTED]> 01/19/2006 10:10 AM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Database Access What are

Re: Database Access

2006-01-19 Thread Rick Reumann
Asad Habib wrote the following on 1/19/2006 10:10 AM: What are the different ways in designing the persistence layer so that it works with a Struts application? Most either recommend Hibernate or iBATIS. I like iBATIS. I have a lesson on it using it with Struts that should be pretty easy to f

Database Access

2006-01-19 Thread Asad Habib
What are the different ways in designing the persistence layer so that it works with a Struts application? I am looking for a simple way to access a database. Should I use hibernate? Are there any articles online that discuss these alternatives and their tradeoffs? Thanks. - Asad

Re: The mailreader example, database access

2005-09-27 Thread Ted Husted
Some parts of the MailReader are well designed. Others not so much. Quoting from the Struts 1.2 documentation: * http://struts.apache.org/userGuide/building_controller.html The MailReader example application included with Struts stretches [the MVC] design principle somewhat, because

The mailreader example, database access

2005-09-22 Thread Koen Jans
The struts design guidelines states that Actions perform the processing required to deal with a request (such as saving a row into a database); this can be done by logic code embedded within the Action class itself, BUT should generally be performed by calling an appropriate method of a business lo

Re: Newbie: Where to put instance for database access?

2005-07-06 Thread BHansard
ease respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: Newbie: Where to put instance for database access? Create a singleton class, that holds the instance of a connection in a ThreadLocal class in that singleton -- this way you don&#

Re: Newbie: Where to put instance for database access?

2005-07-06 Thread Ed Griebel
You should be using some type of data source or preferrably a connection pool based on a data source. Most web servers include a connection pool implementation and all that's needed is to define the connection pool, define the data source, and then link the two. Your web app will then get a connect

Re: Newbie: Where to put instance for database access?

2005-07-06 Thread Aleksandar Matijaca
Create a singleton class, that holds the instance of a connection in a ThreadLocal class in that singleton -- this way you don't have to keep stuff in the session... Regards, Alex. On 7/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi! > > I have maybe a simple question: > > My web-

RE: Newbie: Where to put instance for database access?

2005-07-06 Thread Jesse Alexander (KBSA 21)
Yes. Check with servlet-APIdoc... Alexander -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 11:10 AM To: user@struts.apache.org Subject: AW: Newbie: Where to put instance for database access? >Should it be stored in

Re: AW: Newbie: Where to put instance for database access?

2005-07-06 Thread Stéphane Zuckerman
[EMAIL PROTECTED] a écrit : Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? getServlet().getServletContext().getAttribute(xxx) is it the same as request.getSession().getServletContext().getAttribute(xxx) ? Yes. -- Stéph

AW: Newbie: Where to put instance for database access?

2005-07-06 Thread Peter . Zoche
>Should it be stored in the ServletContext for application scope? But >how do I access this instance from my Actions? >getServlet().getServletContext().getAttribute(xxx) is it the same as request.getSession().getServletContext().getAttribute(xxx) ? Peter ---

RE: Newbie: Where to put instance for database access?

2005-07-06 Thread Marco Mistroni
>Should it be stored in the ServletContext for application scope? But how do >I access >this instance from my Actions? getServlet().getServletContext().getAttribute(xxx) Or would it be better to use data-sources? If I should use them, does anybody know a good tutorial on the internet? Perhaps

Newbie: Where to put instance for database access?

2005-07-06 Thread Peter . Zoche
Hi! I have maybe a simple question: My web-app has to get data out of a database. I have a class DatabaseHandler which holds a connection to the database and provides methods to query it. I would like to have only one instance of this class in my web-app. But I don't know where to put it. Should

Re: Database Access

2005-02-02 Thread Larry Meadors
I have tried jdbc, hibernate, and iBATIS for data access. For me, it was a matter of finding a balance between simplicity (low-level jdbc resouce management sucks), power (how can I optimize this SQL statement?), flexibilty (do not dictate to me how to write applications), and testability (mocking

Re: Database Access

2005-02-02 Thread Ben Taylor
So you use one approach or the other? On Tue, 01 Feb 2005 18:43:41 -0600, Vic <[EMAIL PROTECTED]> wrote: > See if this helps: > > http://wiki.apache.org/struts/DaoRelated > > .V > > Ben Taylor wrote: > > >Can anyone tell me the best way to setup / manage database connections > >using Struts?

Re: Database Access

2005-02-01 Thread Vic
See if this helps: http://wiki.apache.org/struts/DaoRelated .V Ben Taylor wrote: Can anyone tell me the best way to setup / manage database connections using Struts? I've read a couple of books on Struts and they talk about using a processbean though I am unsure how this is linked with things like

Database Access

2005-02-01 Thread Ben Taylor
Can anyone tell me the best way to setup / manage database connections using Struts? I've read a couple of books on Struts and they talk about using a processbean though I am unsure how this is linked with things like iBATIS (http://www.ibatis.com/), or the Struts DataSource manager (as both menti

RE: multiThread, action and Database access

2004-11-16 Thread McCormack, Chris
Set a HTTP header to refresh the request every 30 seconds. -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: 16 November 2004 08:45 To: Struts Users Mailing List Subject: Re: multiThread, action and Database access You need to be more specific, I think. See below

Re: multiThread, action and Database access

2004-11-16 Thread Dakota Jack
You need to be more specific, I think. See below: Jack On Tue, 16 Nov 2004 07:33:40 +0100 (CET), Ryan julius <[EMAIL PROTECTED]> wrote: > Hi, > > I have in my project, an action /ReadDataBaseData.do and the corresponding > handler : > public ActionForward accessDatabase(ActionMapping, ActionFo

Re: multiThread, action and Database access

2004-11-15 Thread Andrew Hill
Actions and their corresponding jsps exist to handle requests sent by the browser. Its a client pull model, so you cant schedule to push data to the client at intervals (I would recommend staying away from trying any tricky hacks that involve keeping the http connection open). What you can do i

multiThread, action and Database access

2004-11-15 Thread Ryan julius
Hi, I have in my project, an action /ReadDataBaseData.do and the corresponding handler : public ActionForward accessDatabase(ActionMapping, ActionForm, ...) ; This action forwards to the page displayData.jsp Problem: The database is populated each 30 seconds by an external server. Question : Ho

Re: Struts Sample / Best Practices for Database access

2004-07-15 Thread Vic Cekvenich
http://www.reumann.net/do/struts/ibatisLesson1 Richard Reyes wrote: Hi Guys, Newbie question, where can i get struts sample application using database components like DAO, JDO or Hibernate samples. Thanks Richard - To unsubscrib

Re: Struts Sample / Best Practices for Database access

2004-07-15 Thread Hubert Rabago
at least a trick subject. > > > >In a Struts application, the best practice for database access is for > Struts to be unaware that there is even such a thing as a database. If you > are using the Struts best practice, then it shouldn't matter whether the > database exam

Re: Struts Sample / Best Practices for Database access

2004-07-15 Thread Richard Reyes
Thanks Ted. Where can i get the mailreader webapp again? Ted Husted wrote: This is kind of a trick question, or at least a trick subject. In a Struts application, the best practice for database access is for Struts to be unaware that there is even such a thing as a database. If you are using the

Re: Struts Sample / Best Practices for Database access

2004-07-15 Thread Ted Husted
This is kind of a trick question, or at least a trick subject. In a Struts application, the best practice for database access is for Struts to be unaware that there is even such a thing as a database. If you are using the Struts best practice, then it shouldn't matter whether the dat

Re: Struts Sample / Best Practices for Database access

2004-07-14 Thread Van
On Thu, 15 Jul 2004 14:16:29 +0800, Richard Reyes <[EMAIL PROTECTED]> wrote: > Newbie question, where can i get struts sample application using > database components like DAO, JDO or Hibernate samples. I never quite get around to downloading it and taking a look at it myself, but, I hear good thin

Struts Sample / Best Practices for Database access

2004-07-14 Thread Richard Reyes
Hi Guys, Newbie question, where can i get struts sample application using database components like DAO, JDO or Hibernate samples. Thanks Richard

Re: Database access in contextInitialized

2004-05-02 Thread Richard Yee
Craig, When I put logging statements in the ServletContextInitializer class, I see that the ServletContextInitializer.contextInitialized() method is actually called after the servlet init() methods for servlets that load at startup. Is this correct? You say that the contextInitialized() gets cal

Re: Database access in contextInitialized

2004-05-02 Thread Samuel Rochas
Hello Craig, Indeed, the recommended pattern today is for you to acquire your DataSource instances from the JNDI naming context Thanks for your advise. I was the way I handled it before using struts, so I will continue that way. Sincerly Samuel --- andinasoft SA - Software y Consulting --- Ma

Re: Database access in contextInitialized

2004-05-01 Thread Craig R. McClanahan
Samuel Rochas wrote: Hello Struts Gurus, I am starting with struts. I used to make some initialization in my Servlets using the init() method. With struts, I just implemented the contextInitialized method of ServletContextListener Interface, and I have a place for such initializations. Fine.