• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

please help regarding pagination

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic