i need a strategy for the following problem. There is a JSP page that shows the results in an HTML form. However as the items to be shown are so large, they need to be shown on page by page.(as forums in javaranch)
getting all of the results and caching on the server does not seem fine. how can we use SQL taking into account the fact that records can be deleted and added during the page selections?(there is an auto-increment ID(PK) field for the records)
do you recommend to take all the 1000 records and hold them in memory(in the session) and show 10 by 10?
It is not recommended to do this. consider a case when user has opened 2-3 instances of jsp in different IE windows and viewing 10 record, you can never predict when user want to click next for viewing next 10 records. how long you would be holding same data in memory