samedi 25 mai 2019

How to implement database searching in servlets

I am developing my first Java based website and want to serve results on user's query. I searched for solution on the internet but all the solutions were designed for serving as there are very few results like the ResultSet object contains only 4 or 5 set of data when searching using query :

select * from [table] where name="abcd"

But in real time the results may consist of millions of records and we just can't send all the records to the client at once. I want to send only 10 pieces of data from the search result at a time like Google does. Servlet is designed to send the whole response at once. How can I send only 10 data at a time then next chunk of 10 and so on when user clicks at "next" button?




Aucun commentaire:

Enregistrer un commentaire