Welcome to Dream.In.Code
Become a Java Expert!

Join 149,819 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,718 people online right now. Registration is fast and FREE... Join Now!




how to do paging in jsp

 
Reply to this topicStart new topic

how to do paging in jsp, how to do paging in jsp

Rating  2
lmw_s
16 Feb, 2007 - 01:04 AM
Post #1

New D.I.C Head
*

Joined: 15 Feb, 2007
Posts: 1


My Contributions
I want to know how to do paging in a jsp. Im getting data from a database as an object list and show them using a display:table. I want to show 10 records in one page and rest like in next pages. So can you give me a sample code. I have shown here my code in the jsp where I use to get data. Pls tell me what are the tags I need to add and anything to be changed in sql queries and so on. smile.gif

CODE
<display:table border = "0" width="100%" scope="session"  pagesize="15" offset="15" name="recievedReportQueues" styleClass="table_report" requestURI="receivingSmsReportPaging.do">
                      <display:column  property="id" title="Id"  align="center" href="recSMSValueShow.do?showRec=showRecievedDetails" paramId="recievedSMSValueSid" paramProperty="id"  sort="true" width="10%"/>    
                      <display:column property="module" title="Module" width="10%" align="center" sort="list"/>
                      <display:column property="modifiedDateOnly" title="Updated Date" width="10%" align="left" sort="list" maxLength="15" />                  
                      <display:column property="modifiedTimeOnly" title="Updated Time" width="20%" align="left" sort="list" maxLength="15" />                  
                      <display:column property="mobileNo" title="Sender Mobile Number" width="15%" align="left" sort="list"  />
                      <display:column property="status" title="Status" align="left" width="10%" sort="list"/>                      
                      <display:column property="message" title="Message Text" width="35%" align="left" sort="list"  maxLength="40"/>
                      <display:setProperty name="sort.behavior" value="list" />
                      <display:setProperty name="paging.banner.include_first_last" value="true" />
                      <display:setProperty name="table_report" value="true" />
                      </display:table>



Please help me with this.... huh.gif
User is offlineProfile CardPM
+Quote Post

Amadeus
RE: How To Do Paging In Jsp
16 Feb, 2007 - 06:08 AM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,351



Thanked: 51 times
Dream Kudos: 25
My Contributions
Do you want to page the results from the database (which means the query will be re-run on the next set when the next page is clicked) or do you want to pull all records from the database, and simply page through the entire set using jsp?

http://forum.java.sun.com/thread.jspa?thre...ssageID=1845573

User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 08:46AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month