This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Pagination Doubt" Watch "Pagination Doubt" New topic
Author

Pagination Doubt

subhadeep chakraborty
Ranch Hand

Joined: Jul 29, 2006
Posts: 67
hi,
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.

Thanks,
Subhadeep
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

We have a FAQ entry : http://faq.javaranch.com/java/PaginationOrPaging

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.
OR
2) Do you think that if correctly implemented a satisfactory answer can be found with only java.

Thanks,
Subhadeep.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Pagination Doubt
 
Similar Threads
Pagination
Pagination in Struts2
Pagination
PAGINATION
Pagination