page navigation in jsp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mallz
    New Member
    • Mar 2007
    • 52

    page navigation in jsp

    hi,
    i need to retrieve only 5 records at a time from the database for display in my jsp page. also i need to provide for previous and next page navigation.
    how do i do that?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by mallz
    hi,
    i need to retrieve only 5 records at a time from the database for display in my jsp page. also i need to provide for previous and next page navigation.
    how do i do that?
    What do you have so far?

    Comment

    • mallz
      New Member
      • Mar 2007
      • 52

      #3
      Originally posted by r035198x
      What do you have so far?
      hi,
      i am able to retrieve records from the database......
      i tried using a for loop for retrieving 5 records at a time, it works, but i do not know how to do page navigation.

      i visited this site and downloaded the related files but im unable to understand how to use it...
      http://jsptags.com/index.jsp

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        r u talking about history.back or history.forward ??????

        Comment

        • mallz
          New Member
          • Mar 2007
          • 52

          #5
          Originally posted by dmjpro
          r u talking about history.back or history.forward ??????
          both ways........... ............... ............... ............... .

          Comment

          • dmjpro
            Top Contributor
            • Jan 2007
            • 2476

            #6
            then u can use .... in html code like this ....


            <input type = button value = 'Back' onclick = 'hiostory.back( )'>
            <input type= button value = 'forward' onclick = 'history.forwar d()'>

            use this ... best of luck

            Comment

            • itsraghz
              New Member
              • Mar 2007
              • 124

              #7
              if you are looking for the real Pagination aspects, you need to better do a google search for the same.

              Say, "JSP + Pagination" will do. There are some good opensource components for Pagination which you can customize it according to your needs.

              Ultimately it deals with a Bean Component for the first,last,prev ,next values being clicked and the logic to adjust the values when each button is clicked. But the most important thing is how and when you fetch the data from the database and where you keep them. [caching].

              Good luck!

              Comment

              Working...