| Author |
How to show only 10 entries in a jsp-page?
|
Gerry Mueller
Greenhorn
Joined: Dec 30, 2009
Posts: 17
|
|
Hi, I am ther again wiht a new problem.
I just have a vague idea how i can resolve the problem.
So i post this to have some idea. Perhaps you're allready do this.
The Problem: I have a database table with more than 100 entries and i would like to show these
in a jsp-page, Not a problem! (connection to database and... follow my sight)
The really problem is to show these entries only 10 per page and still have only jsp-page.
So I want to have only one jsp-page to show this entries, and in this page only 10 entries and 2 butons:
a foward and a backward one.
How can i do it. Have anybody an idea?
Please help!
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
What you want to achieve is called "Pagination" and we have a beautiful link for this:
http://faq.javaranch.com/java/PaginationOrPaging
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
Gabriela Cristian
Greenhorn
Joined: Dec 02, 2008
Posts: 18
|
|
Hello
you can use this simple and elegant tool: display tag. follow their example and you will see how easy it is. good luck
http://displaytag.sourceforge.net/1.2/
|
 |
Prashant Saraf
Ranch Hand
Joined: Sep 25, 2006
Posts: 50
|
|
yes display tag will make it very simple.
|
 |
Gerry Mueller
Greenhorn
Joined: Dec 30, 2009
Posts: 17
|
|
Hi,
thank you for your answer.
I tried it wiht displaytag-library, but it didn't work:
I write this code on my jsp-page
In this code, my table name is "lieferanten". But i got an error on TestList(10, false) (is red underlined)!
when pointing the mouse on it, it show: "TestList can't be resolved to a type"!!
Ans the tag "display:table" is yellow underlined on <display:table name="lieferanten" />
|
 |
 |
|
|
subject: How to show only 10 entries in a jsp-page?
|
|
|