Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Pager Tags Newbie

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
I have read the Pager Tags example but still could not even get the output that I want when I use the example code with my database extraction in the Pager Tags documentation?
My sample code is as below:
__________________________________________________<%@ page language="java"
import="java.io.*,
java.sql.*,
java.util.*,
com.kengyiam.epz.database.ConnectDB"
%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<pg ager>
<pg aram name="keywords"/>
<%
ConnectDB connDB = new ConnectDB();
Statement stmt = connDB.getConnect();
ResultSet rs = stmt.executeQuery("SELECT Make FROM Make ORDER BY Make");
%>
<% while(rs.next()){ %>
<ex:searchresults>
<pg:item>
<%= rs.getObject(1).toString() %>
</pg:item>
</ex:searchresults>
<% } %>
<pg:index>
<pg:first>
<a href="<%= pageUrl %>">[ (<%= pageNumber %> |< Previous ]</a>
</pg:first>
<pg rev>
<a href="<%= pageUrl %>">[ (<%= pageNumber %> << Previous ]</a>
</pg rev>
<pg ages>
<a href="<%= pageUrl %>"><%= pageNumber %></a>
</pg ages>
<pg:next>
<a href="<%= pageUrl %>">[ Next >> (<%= pageNumber %> ]</a>
</pg:next>
<pg:last>
<a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %> ]</a>
</pg:last>
</pg:index>
</pg ager>
____________________________________________________
Can you please kindly tell me where my mistake is?
Thanks alot,
Warmest regards,
Yiam
 
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic