File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Pager Tags Newbie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Pager Tags Newbie" Watch "Pager Tags Newbie" New topic
Author

Pager Tags Newbie

kengyiam Ng
Greenhorn

Joined: Aug 28, 2003
Posts: 7
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pager Tags Newbie
 
Similar Threads
probelm in pager tab.
Why it can't paging?!
Paging with TagLib pg:pager
Paging in JSP
Pagination?