Solved

how to do paging in jsp

Posted on 2003-11-18
6
580 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

734 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