jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes Dynamic next/previous link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Dynamic next/previous link" Watch "Dynamic next/previous link" New topic
Author

Dynamic next/previous link

labanya roy
Greenhorn

Joined: Jan 13, 2004
Posts: 12
Suppose depending upon the number of records a page will have next /previous link .Say max 25 per page.
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Hello labanya roy,
can u be describe ur quetion in more detail.
r u trying to implement paging in ur jsp page. or u just want to display next / prev button?


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
labanya roy
Greenhorn

Joined: Jan 13, 2004
Posts: 12
Originally posted by Prakash Dwivedi:
Hello labanya roy,
can u be describe ur quetion in more detail.
r u trying to implement paging in ur jsp page. or u just want to display next / prev button?
labanya roy
Greenhorn

Joined: Jan 13, 2004
Posts: 12
Sorry for the previous reply.yes paging thru java
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Here is simple implementation
Create a footer jsp, this jsp will three inputs
1. total number of pages
2. current page number as input.
3. target url
In footer jsp, you can run a for loop, to print page numbers, all being hyper links to target url, current page number will not be hyperlink.
This jsp can be used whereever u want to provide paging functionality.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic next/previous link