JSP pagination without retrieving the entire result set?

I need to display log entries from a database. Of course, the log data is huge, so I have to show the results on several pages and ** without ** getting ** all ** the ** log data at once, but as the user navigates through the pages.

I know about DisplayTag and TableTags , but it seems to me that they both retrieve all the data before applying pagination.

Before you start developing your own JSP tag, does anyone know of a third-party solution to this problem?

Thanks
Marius

+3
source share
3 answers

DisplayTag: .

+3
+1

Inside your JSP is not a good place to solve the whole problem. In a typical layered approach, you separate the presentation (JSP here) from data access (where you make your request).

Your displaytag / jsp tag should go to the data access level that it wants (for example, I need the next 30 and I'm on page 5), and then your data access level will process the broken request.

0
source

Source: https://habr.com/ru/post/1697505/


All Articles