Despite the honourable wish to help, How does an advice to use jstl-sql tags relates to a struts-user list?
To the original question: Why don't you put exactly the same amount of databeans in your arraylist as you want to show? And where do you do it? Exact, in your action. Alternatively you could use one of many paging taglibs out there (check sourceforge). > -----Ursprüngliche Nachricht----- > Von: David Bolsover [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 18. Januar 2005 11:47 > An: Struts Users Mailing List > Betreff: RE: How to limit the result? > > > Processing ResultSets into custom beans can be a frustrating process.. > > You should have look at javax.servlet.jsp.jstl.sql.ResultImpl and > associated > classes. > > You will find in the jstl source distribution. > > Essentially, with a little effort, these classes will process a ResultSet > and return a javax.servlet.jsp.jstl.sql.Result object. The Result object > is > easily itterated over in your JSP > > db > > > > -----Original Message----- > From: Manisha Sathe [mailto:[EMAIL PROTECTED] > Sent: 18 January 2005 09:34 > To: Struts Users Mailing List > Subject: Re: How to limit the result? > > > After long search i found out that MSSQL does not support Limit / range of > records to be fetched. > > Now i am thinking -> > 1)putting each row into one databean. > 2)Put databean into ArrayList > 3)send this arraylist back to JSP > > with jstl tags i can loop through it and display. <c:foreach>...<c:out> > > But how i can decide it has reached page limit ? because at that point of > time i want to display my footer (and header for new set). > > Is there any way to set some variable and keep on incrementing it .. check > for pagesize and then include header/footer etc... > > Is there any better solution ? Am i going a long way ? > > regards > Manisha > > > > > > Manisha Sathe <[EMAIL PROTECTED]> wrote: > I have a query which results into large data. This data i want to display > in > a group of 20. After every 20 records i want to add header and footer to > it. > > Is it possible to get the result set data into batch of 20 ? means can i > specify start and end index of query ? > > regards > Manisha > > > > --------------------------------- > Do you Yahoo!? > The all-new My Yahoo! What will yours do? > > --------------------------------- > Do you Yahoo!? > The all-new My Yahoo! Get yours free! > ======================================================= > This message has been scanned for viruses and dangerous > content using Vet Anti-Virus Protection and is believed > to be clean. > ======================================================= > > --------------------------------------------------------------------- > 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]