File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Pagination Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Pagination Doubt" Watch "Pagination Doubt" New topic

Pagination Doubt

subhadeep chakraborty
Ranch Hand

Joined: Jul 29, 2006
Posts: 67
I have a doubt whether its better to use pagination logic in jsp and store the data in session or store the same on the persistence layer such as hibernate.

As I understand.
If you are storing in Jsp ,memory use will be high and this is more of model work then view work(storing the data).
If I store it in the persistence layer, the request has to go all the way to get the data.

The scenario is :-
1) User might access any of the pages abruptly and there are lots of pages(100).
2) How does the solution get effected in case of a clustered environment.

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

We have a FAQ entry :

follow the algorithm. if you dont understand, then write your own. I started my first paging implementation in this fashion only !
subhadeep chakraborty
Ranch Hand

Joined: Jul 29, 2006
Posts: 67
Thanks "Seetharaman". I understand that its difficult to answer these sort of questions and I am not expecting a direct answer.We have people here having a lot of experience and knowledge and if they guide us a bit we can take better decisions.
I have these questions.
1) Can any other language integrated with java be of some help.
2) Do you think that if correctly implemented a satisfactory answer can be found with only java.

subject: Pagination Doubt