Absolutely right, Oliver. Mike, here is a link to a JavaWorld article on this topic that may interest you: http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
Jim > -----Original Message----- > From: Oliver Refle [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 27, 2002 8:26 AM > To: Struts Users Mailing List > Subject: AW: How best to get SQL:JDBC data? > > > Hi Mike, > normally i take the Action classes to collect all my data. Maybe you > should implement a Data Access Object which offers an API to > access the > database and > returns the result. In the action you collect all the data you need > (means you use the methods of your DAO ) and then on the JSP you > simply present the collected Data. > So you seperate business logic from database access and from > presentation > > Oliver > > -----Ursprungliche Nachricht----- > Von: Mike Brooke [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 27. Februar 2002 15:06 > An: Struts Users Mailing List > Betreff: How best to get SQL:JDBC data? > > > Hello Everyone, > > I am new to using struts and I have a design issue. Is it > better to use > an Action servlet to create a bean of data from a database, or is it > better to create a taglibs that would return the bean. > Another solution > could be to use the dbTag taglibs from the Jakarta-taglibs > and build the > bean using jsp scripts (but I have read that this is not the ideal way > if you are using the struts framework). My query is to find > data in our > inventory table, currently the system scripts the database (SQL:jdbc) > calls as a jsp script and has different <jsp:include> files to return > either prices or descriptions and create the form. > > Even if you have url links that I can do more research that would be > great. I do have the WROX's Professional JSP 2nd edition, > but so far I > have not come across any examples using the jdbc database. I have set > the database up using the datasource as suggest in the > Utilities section > of the struts documentation. > > // eom > // Michael A. Brooke > // Magstar Inc. > // e-mail: [EMAIL PROTECTED] > // phone: (416) 447-1442 x 273 > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> >