How send request of datatable to the webservice for processing

How send request of datatable to the webservice for processing

niteshsharmaniteshsharma Posts: 2Questions: 1Answers: 0

I created a datatable and my code is below:

$("#d1").dataTable({
"bServerSide": true,
"iDisplayStart":0,
"iDisplayLength":9,
"sEcho":"1",
"bPaginate": true,
"iColumns" : ['id','test_code','common_name','mrp'],
"sAjaxSource": "/pagination/data",/* Herei called my webservie */
"fnServerParams": function (aoData) {
aoData.push({
"name": "entity",
"value":"pricelist"
});
},
"order": [ 0, 'ASC' ],
"bProcessing": true,
"sPaginationType": "full_numbers",
"bJQueryUI": true
});

//Webservice Code
@POST
@Path("/pagination/data")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response getDatatablePaginationData(JsonNode datatTableData) {
datatTableData.forEach(System.out::println);
return Response.ok().build();
}
Now i am unable to understand how can i process my request from a webservice.?

Answers

  • niteshsharmaniteshsharma Posts: 2Questions: 1Answers: 0

    I do this by using a servlet ,serve request to servlet and get all parameters there .

This discussion has been closed.