I am looking for how to implement jQuery Data Table with server side processing in Java. I have tried the following way by using the below parameters. Below is my jQuery ready function code.
$(document).ready(function() {
//url = http://localhost:8080/jQuery-DataTable-Java-Integration/serverExample
$('#myTableId').DataTable({
"serverSide" : true,
"processing" : true,
/*"bProcessing" : true,
"bServerSide" : true,*/
"ajax" : {
"url" : "serverExample",
"type" : "POST"
},
"columns" : [ {
"data" : "Phone Number"
}, {
"data" : "name"
}, {
"data" : "Email"
} ]
});
});
In my servlet doPost() method I the request parameter sEcho is null.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
logger.info("In do post method of server servlet..");
logger.info("sEcho request parameter = " + request.getParameter("sEcho"));//returning null
//other code here
}
My jQuery Data Table version is 1.10.7. Which parameters should be used, serverSide or bServerside, I tried both ways, but still the same. Any latest updated working example references would be helpful.
Aucun commentaire:
Enregistrer un commentaire