Hi Folks,
Im a newbie to web programming and programming in general . I written a web application that requires me to paginate my result set .
Ive implemented this pagination using jstl avoiding the usage of any custom tags.
Ive placed my
jsp used to generate pagination in the code below.
The problems that I face currently are --
1. The value generated at point A is automatically typecasted to a floating value and hence the page links are displayed as 1.0,2.0,3.0 etc. I would like to display 1,2,3 instead , anyway I could work around to get that??
2.Secondly , I want to generate links for next page and previous page . But for this , I require the to be available outside the loop for each iteration so that I can use it to calculate my next page and previous page with respect to the current page. Or it would be great if anyone could suggest a method where I could display the next and previous links in the same c:forEach loop but only once rather than for each page
something like <Next>[1] [2]..<Last>
Rather than <Next>[1]<Last><Next>[2]<Last>..
Thanks in Advance.