It is necessary to transfer data from mysql to the page in the datatables plugin. Controller:
@RequestMapping(value = "/getData", method = RequestMethod.POST) public @ResponseBody List<Result> getData(){ return service.findAll(); } Page:
<table id="resultTable" class="dataTable"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Symbol</th> <th>Preis</th> <th>PJ</th> <th>EJT</th> <th>EJH</th> <th>T1</th> <th>T6</th> </tr> </thead> <tfoot> <tr> <th>ID</th> <th>Name</th> <th>Symbol</th> <th>Preis</th> <th>PJ</th> <th>EJT</th> <th>EJH</th> <th>T1</th> <th>T6</th> </tr> </tfoot> </table> <script> $.ajax({ url : "getData", dataType : "json", type: "POST", success : function(json) { alert("Success"); $('#resultTable').dataTable(json); }, error: function () { alert("Error"); } }); </script> Json seems to be accepted, but how do I process it for datatable?