File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes quick paging calculation question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "quick paging calculation question" Watch "quick paging calculation question" New topic
Author

quick paging calculation question

John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 171
I am using the below to calculate my page links, using LIMIT in the DB portion.

The total count is 127. This should generate 7 pages but it is only generatong 6 because the division is calculation 6.35. How would i push it to generate the 7th page?


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56202
    
  13

The modulo operator can be used to determine if there is a remainder after division.

P.S. Re-evaluate your HTML usage. The <font> tag is long deprecated in favor of CSS.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 171
lol yea they was left from an old example i was using from my previous paging tags that i am replacing with this code
[ November 24, 2008: Message edited by: John Schretz ]
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 171
Ok, Here is my solution. How does this look?

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: quick paging calculation question
 
Similar Threads
Problems with paging i created
JSTL paging problem
Problem with nested c:forEach
JSTL paging error
problem incrementing loop in jstl