aoData push and servlet

aoData push and servlet

datatblusrdatatblusr Posts: 2Questions: 0Answers: 0
edited June 2013 in General
I'm trying to push data to the servlet using aoData but its not working. Not sure what is wrong here.

[code]
oTable1 =
$("#mytablesorter1").dataTable({
"sDom": 'rt<"bottom"plf>',
sPaginationType: "full_numbers",
bStateSave: true,
"bServerSide": false,
"sAjaxSource": "/servlet1/srv",
"fnServerData": function(sSource, aoData, fnCallback) {
aoData.push( {"name":"myname", "value":"myvalue"} );
$.getJSON( sSource, aoData, function (json){
fnCallback(json)
});
}
});
[/code]

[code]
servlet code:
String name = request.getParameter("name");
String value = request.getParameter("value");
[/code]

Replies

  • datatblusrdatatblusr Posts: 2Questions: 0Answers: 0
    This is resolved by making this change to servlet code:
    [code]String name = request.getParameter("myname");[/code]

    from

    [code]String name = request.getParameter("name");[/code]

    Remove the line:
    [code]String value = request.getParameter("value");[/code]
This discussion has been closed.