Pagination advice

Hi guys,

I am trying to do a pagination for data(JSP) that is retreived from Oracle tables(java program). The data that is retrieved is huge.

i was thinking if i can read all the data and dump it to a file. then display the results from file lets say 10 records at a time .

Is this a write approach? Is there some other approach which might be better. Please advise.

[392 byte] By [anaik100a] at [2007-11-27 5:31:49]
# 1

not a great idea. i think oracle has some functions which will allow you to ask for a certain range of results, so just make sure your query has an Order By clause and you can use google to search for Oracle Pagination. i'm fairly certain there is a way to do that in Oracle, if not, there are better java approaches to this issue than dumping the data to a file, that would be a huge waste of I/O and disk space, especially if the user only looks at the first row.

could you instead offer the user some search parameters to help limit their results? you could also limit Oracle to only return say the top 100 rows and inform the user they will need to be more specific if more than 100 rows come back.

den2681a at 2007-7-12 14:57:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Well, There are lot of things to consider.1. What do you mean by dumping result set into a file? (a design pattern or other thing)I suggest to query DB and put all the results in a DAO then query from the dao using Struts with JSTL tags for pagination. Regards,
PaviEluri20a at 2007-7-12 14:57:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
try to use pagging library http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html
abhishekpandey_y2ka at 2007-7-12 14:57:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...