I'm in the middle of implementing Catalog Page - following Marty Hall book -well the sample codes only use static Array.
My catalog data is in table.
is it good idea to load all records in catalog object (ArrayList)? they are around 100 at the moment and growing.
is there another/better approach? could someone show me how to implement paging (say 20 item per page) in Servlets or should handle by JSP? how? is there any online sample/resources?
thanks all tony
Joined: Aug 03, 2002
There is a datastructure called Cached Rowset in Java which can be used to get the data in a tabular form in one call to the database and then u can read the data records 10 rows at a time from that. This is also called disconnected rowset as it doesn't fires a connection every time next set of records are fetched.
I think this can be the suitable option for you if your data doesn't get updated every time.