There is a sample at http://datatables.net/release-datatables/examples/data_sources/server_side.html
however the code is in PHP. But having a look at it you will see that there request parameters it uses are iDisplayStart and iDisplayLength
You will have to reimplement this in your server side java.
Below is some code I have used (using Stripes)
Long count = (Long) getContext().getRequest().getSession(true).getAttribute("xbcount");
if (count == null) {
count = histDao.getCount();
getContext().getRequest().getSession(true).setAttribute("xbcount", count);
}
DataTableRes res = new DataTableRes (getsEcho(), count, count);
int rowStartIdxAndCount[] = {getiDisplayStart(), getiDisplayLength()};
List<HistoryUint> list = histDao.findAll(rowStartIdxAndCount);
And the DAO
public List<HistoryUint> findAll(final int... rowStartIdxAndCount) {
EntityManagerHelper.log("finding all HistoryUint instances",
Level.INFO, null);
try {
final String queryString = "select model from HistoryUint model";
Query query = getEntityManager().createQuery(queryString);
if (rowStartIdxAndCount != null && rowStartIdxAndCount.length > 0) {
int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
if (rowStartIdx > 0) {
query.setFirstResult(rowStartIdx);
}
if (rowStartIdxAndCount.length > 1) {
int rowCount = Math.max(0, rowStartIdxAndCount[1]);
if (rowCount > 0) {
query.setMaxResults(rowCount);
}
}
}
return query.getResultList();
} catch (RuntimeException re) {
EntityManagerHelper.log("find all failed", Level.SEVERE, re);
throw re;
}
}