I know this is something I can find very easily on google. But trust me I have put 5 hours but not able to find any code for this. I want to implement server side pagination in my application. I new to Jquery, pagination. I want to limit number of pages in pagination UI, something like this. But I don't know how should I implement it. In my application I am passing list of records that it fetched from database to jsp and jsp is just putting all those records in table.
I have used dataTables plugin in my last two Struts2 based projects. Among various amazing capabilities it also provides server side pagination. Here is how to implement server side code for implementing it in JSP: