Q:

Large catalogs, to JSp page is causing OutOfMemoryErrors

 Catalog catalogs= product.getAllCatalog();

 request.setAttribute("catalogs",catalogs); 
  ..
 ...
...

so when i am dispatching request to the JSP page with large no of catalogs size it  causing OutOfMemoryErrors .
can some one tell me how to fixed this problem ,any way to fixed this problem.

A:

Pagination can solve you problem .and in each iteration i.e when moving to next page clear your 1 level cache it can solve your problem .
For more infomation about how to implement pagination with example click here

