jsp pageing problem
Posted
by user93796
on Stack Overflow
See other posts from Stack Overflow
or by user93796
Published on 2009-05-12T17:23:55Z
Indexed on
2010/06/02
20:04 UTC
Read the original article
Hit count: 347
jsp
i am using the redy made paging tags.B But it give me a error of null pontinter exception. the first page is displayed correctly.But when i click next it gives the error
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %> <%
Iterator i = null; Set tutorials = (Set ) request.getAttribute("tut_lst"); request.setAttribute("tut_lst",tutorials);
i = tutorials.iterator(); // error occus here
%>
<%
while(i.hasNext())
{
Tutorials t = (Tutorials)i.next();
%>
<BR> <a href ="down?tid=<%out.println(t.getUploadid() );%> "> <%out.println(t.getFilename()); %> </a></td>
</pg:item>
<%
}
%>
<pg:first>
<a href="<%= pageUrl %>">[ (<%= pageNumber %>) |< Previous ]</a>
</pg:first>
<pg:prev>
<a href="<%= pageUrl %>">[ (<%= pageNumber %>) << Previous ]</a>
</pg:prev>
<pg:pages>
<a href="<%= pageUrl %>"><%= pageNumber %></a>
</pg:pages>
<pg:next>
<a href="<%= pageUrl %>">[ Next >> (<%= pageNumber %>) ]</a>
</pg:next>
<pg:last>
<a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
</pg:last>
© Stack Overflow or respective owner