Hi Prasad,
    If the data is not much, then fetch the entire thing say 100 records.
For displaying the data onto the JSP use a tag library(display tag), which
takes the arraylist object and assigns it to the tag library list and then
you can go ahead and do paging(click next and show say 10 records of 100
then next 10, and so on).

Worked good for me... but the only problem comes when the data is hige, say
some 50,0000 or above, as all the data is getting cached by the tag library
objects.

It's simple ... really easy to implement and paging works great. Also the
tag library provides you with numerous formatting options.

Try:
http://www.displaytag.org/example-paging.jsp

Warm Regards

Vishal Mirchandani
Project Lead - E-Sig/D-Sig/FastApp
Syntel Ltd.
502.580.3515(57130)

-----Original Message-----
From: Krishna prasad
To: [email protected]
Sent: 7/22/2005 9:15 PM
Subject: Re: Regarding JSP

hello Mr.Prasad, i read ur query. i've just started my career in j2ee,
so please forgive me if i was wrong. i've a solution that i'm not sure
about.

result set has total records, right. So after displaying the last
record of that particular page, the result set should be pointing to
next record. Store the number of the next record in ServletContext
object which is global. Using the next button, forward the browser to
the same page. Use the ServletContext object to get the  record number
and start displaying the next record. Continue this until the last
record is displayed. Use an 'if' loop to check whether the currently
displayed record is the last one, so that you may not need further
forwarding if it was. Storing the record number as ServletContext
object is the key.

o.k. bye
with regards,
krishna prasad g

On 7/21/05, Prasad Babu <[EMAIL PROTECTED]> wrote:
> Hai,
> This is Prasad from Bangalore.
> My problem is,
> I have some data(database data) either in the result set, Collection
> form(find by some thing in CMP). My problem is the data will be
displayed
> some records at a time and there will be next button to display
another
> some
> records using JSP. its just like yahoo search or google search. Could
> anyone
> help me?
> Thanks in advance
> prasad
>
>
========================================================================
===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email
to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

========================================================================
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to