I need to show almost 300k data in the Data table if I am trying to set all data one time in the Data table then data table becoming slow, please suggest a way IN JSP pages where I can show large data in Data tables.
-
1You can use hibernate pagination to only send limited data from back-end initially and request to back-end for more data only on user's action, for more refer to baeldung.com/hibernate-pagination Also only using datatable in JSP would not solve your problem .Nagesh Tripathi– Nagesh Tripathi2020-07-24 16:47:05 +00:00Commented Jul 24, 2020 at 16:47
1 Answer
Like Nagesh Tripathi wrote, you will need pagination with lazy loading to make this efficient. With plain JSP this is pretty hard to do. Maybe you want to use JSF with PrimeFaces? In that case I can recommend you the following article that discusses how this can be done efficiently: https://blazebit.com/blog/2017/primefaces-datatable-pagination.html
Here is another example that shows how you can use the pagination feature of Blaze-Persistence on top of JPA with Angular on the front-end: https://github.com/Blazebit/blaze-persistence/tree/master/examples/spring-data-webmvc