Solved

how to do paging in jsp

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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