Solved

how to do paging in jsp

Posted on 2003-11-18
6
574 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
A procedure for exporting installed hotfix details of remote computers using powershell
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now