Menu

newbie paging help

Help
ramesh
2005-09-14
2012-10-09
  • ramesh

    ramesh - 2005-09-14

    i am trying to get the paging working with two jsp pages:

    page1.jsp
    <%
    // get from db ..
    request.setAttribute("cachedList", lst);
    %>
    <head></head>
    <body><jsp:forward page="page2.jsp" /></body>

    page2.jsp
    <%
    List cach = new ArrayList();
    cach =(ArrayList)request.getAttribute("cachedList");
    %>
    ...
    <display:table id="row" name="${cachedList}" pagesize="5" >
    <display:column title="Acc" property="acct" />
    <display:column title="Found In" >
    <c:out value="${row.foundIn}" />
    </display:column>
    <display:column title="Name" sortable="true" />
    </display:table>

    when i click on paging it forwards to page2.jsp but i dont see any results. Probably the attribute is lost..how do i retain it? i read the example at
    http://www.displaytag.org/example-paging.jsp. what am i missing ?

    I got all my other startup problems resolved by searching the forums but not this.

    Thanks for any pointers,
    ramesh

     
    • ramesh

      ramesh - 2005-09-14

      i forgot to mention that the first page is visible. consequent clicks to sorting or paging dont show any data. I am using dispaytag v1.0 and displaytag-12.tld, tomcat 5. and eclipse 3.1
      thanks

       

Log in to post a comment.