Solved

how to do paging in jsp

Posted on 2003-11-18
6
579 Views
Last Modified: 2012-05-04
Hi experts,
  i am a new java/jsp developer .
I'd like to know ,how to do Paging using JSP .I am retrieving 1000 records from the database.
First I want to display 10 records per page,after that the next 10 records should be displayed ,like that the following records should be displayed,how i can do this without using taglib.

please inform me to my mail ID:  <edited for privacy reasons by CetusMOD>   if anyone know that.
If u help me to do this,I'll be verymuch grateful to you.
Advanced thankx for all who is going to help me.

with warm regards,
karthick.k.e
0
Comment
Question by:kekarthick
6 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 25 total points
ID: 9770215
First, it is against the EE rules to send answers or comments to an e-mail address.  The discussion must take place on this site.

http://www.experts-exchange.com/help.jsp#hi99

To respond to the question, try this:

http://jsptags.com/tags/navigation/pager/index.jsp
0
 

Expert Comment

by:superman19
ID: 9770323
ha.. this is the most common question that java's developer will ask.

For my case, i tackle this using the hard way. I need to perform some logic in the SQL statement rather than .net way, just choose the Paging Properties.. ha..
0
 
LVL 6

Expert Comment

by:jarasa
ID: 9771628
Hi Karthick.

You should use a Rownum in your query and then just take the records 10 by 10 something like this:

select * from (select ROWNUM rn, table.* from table) b where rn between rn_Init and rn_End;

where rn_Init equals 1 and rn_End equals rn_Init + 10

From your JSP you should call the estatement each time with the last rn you get if you go forward and if you are going backwards the you should call the statemente with the firts (rn - 10).

Have Fun
Javier


0
 

Expert Comment

by:abhinavchaturvedi
ID: 10360001
Hi experts,
  i am a new java/jsp developer .
I'd like to know ,how to do Paging using JSP .I am retrieving 1000 records from the database.
First I want to display 10 records per page,after that the next 10 records should be displayed ,like that the following records should be displayed,how i can do this without using taglib.


Advanced thankx for all who is going to help me.

with warm regards,
aby
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In t…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question