What database and version are you using? Paging can be accomplished in different ways in different databases. In some cases you can use a cursor. Other times you can't. In my current application, I am using an older version of PostgreSQL so I am constrained to using their non-standard LIMIT clause.
Wiebe -----Original Message----- From: Yaroslav Novytskyy [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 6:51 AM To: Struts Users Mailing List Subject: Re: AW: Paged data output Hi! Yes, I think that paging in DB queries is what I need. (I don't whant to select all the data from the table) That's why I'm asking about working examples. I have taken a look at Displaytag and it is realy nice, but this is not exactly what I need. iBatis is a closer solution, but it is needed to take a closer look. Can you please show me a liitle example or write a small step-by-step ref to get what I need. Thanks Yaroslav Novytskyy ----- Original Message ----- From: "Vic (Vinny) Cekvenich" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 10, 2004 3:34 PM Subject: Re: AW: Paged data output > Also iBatis DAO w/ Displaytag. > > BUT.... I allways do paginiation in DB. For example select limit ofset. > Depends of what you think lots of products are (and if you also have lots > of users) > > .V > > > Stahlhut, Axel wrote: >> Hi Yaroslav, >> >> try the displaytag tag library (http://displaytag.sourceforge.net/). >> Maybe it is useful. >> >> Regards >> Axel >> >> >>>-----Ursprüngliche Nachricht----- >>>Von: Yaroslav Novytskyy [mailto:[EMAIL PROTECTED] Gesendet: >>>Mittwoch, 10. November 2004 12:55 >>>An: [EMAIL PROTECTED] >>>Betreff: Paged data output >>> >>> >>>Hi all! >>> >>>Can anyone explain (or point to an example) of how to output data on JSP >>>by pages with page navigation. >>> >>>Example: >>>I have a products DB table with _lots_ of products. >>>then (as far as I could understand) I should >>>1. create a DAO factory >>>2. create a ProductDAO class >>>3. create a Product bean-type class >>>4. in ProductDAO create a method listProducts in which >>> a) make a quiery like SELECT * FROM Products >>> b) for every row create a Product object and add to a list >>> c) return the list to action >>>5. in action.execute save the list in request scope >>>6. redirect to JSPwith the following logic: >>> <logic:iterate id="item" name="Articles"> >>> <bean:write name="item" property="ID" /> >>> <bean:write name="item" property="Name" /> >>> </logic:iterate> >>> >>>Question: >>>If the described abow is correct, how to make paged output. So only 10 >>>products are displayed and links to 2nd, 3rd ... pages >>> >>>Thanks >>>Yaroslav Novytskyy >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]