This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

please help regarding pagination

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib uri="/WEB-INF/lib/pagertaglib.tld" prefix="pg" %>
<pg:pager export="currentPageNumber=pageNumber">
<pg:item>
my search data..
</pg:item>
<pg:index>
<pg:pages><%
if (pageNumber.intValue() < 10) {
%> <%
}
if (pageNumber == currentPageNumber) {
%><b><%= pageNumber %></b><%
} else {
%><a href="<%= pageUrl %>"><%= pageNumber %></a><%
}
%>
</pg:pages>
</pg:index>
</pg:pager>

When i run this on the server, it takes indefinite time to load... When i give stop loading current page, the first 10 results are displayed but the links to the next pages dont appear...... Kindly guide how to solve....I am using websphere application server 6.... working in rationl application developer........

I also tried using <pg:paging> tag

//styleDetails1.jsp
<%@ taglib uri="/WEB_INF/lib/pager-taglib.tld" prefix="pg"%>
<pg:paging pageSize="2">
<pg:item>
my logic..</pg:item>
<pg:index>
<pg:page><%=thisPage%></pg:page>
</pg:index>
</pg:paging>

here, the results are displayed for the first page and the links for the next pages are displayed... but when i click on the link to any of the next pages, it says web page cannot be displayed and the error is:
Could not invoke service() method on servlet /styleDetails1.jsp
Exception thrown:java.lang.NullPointerException

Kindly help!!!
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you briefly describe the problem that you are trying to solve?

Just the code by itself does not explain anything.
 
I am displeased. You are no longer allowed to read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!