Your data structure unfortunately doesn't lend itself to being paginated efficiently that easily.
eg to show records 500-600 you would need to load all the records from 1 to 600, because you don't have any indication of how many are for each date group without retrieving them first.
I would suggest writing a wrapper around this data structure which provides you a "window" of records to render, and have the logic for which records to include in the "window" in that class.
That makes your
JSP then just a simple call to display the current window of records.
General suggestions for your current code:
Use a prepared statement rather than building up your sql via
string concatenation. It avoids potential sql injection attacks.
Consider modifying your top level query like this:
It gives you your date breakdown plus also an indication of how many records are on each date.
With that information, you can make your retrieval logic smarter. eg for retrieving records 500-600 you can skip over complete dates without querying their details.