I think it's a bad idea to have 100 items in the list, when you only plan to
show 10.

For one, you are not sure when the user is going to click the next button,
so you have 100 objects sitting in a list, for a session, and your memory
will go bye bye soon.

You should do some business logic / data model work to only have 10 items in
the list. When they click on next, get next 10. This is much better when it
comes to memory, and I think implementation gets better too.

I am not sure how you are getting your objects in the list, but if you are
using JCBC, look at the ResultSet javadocs. There is something called
fetchSize, try setting it to the number you want.

My 2 cents.

Pritpal 

-----Original Message-----
From: Mahbub ul Huq Bin Kabir [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 10, 2003 9:50 PM
To: [EMAIL PROTECTED]
Subject: Iterating Page by page


Hi,

I'm displaying some data into a jsp page using Struts iterate. It displays 
all the items in to the Array List, but I want to display it page by page 
for example if there are 100 data to be displayed then i'll display 10 data 
on each page.

Can any one have any idea or solution over this prblem.

Thank you,

Mahbub

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
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]

Reply via email to