I am having a slight problem with ajax and Java servlet.
$.ajax({
url: 'sampleURL',
type: 'POST',
data:data,
success: function(response){ },
error: function(){}
});
My data object is made like this
{name:'name',vars:[array]}
My vars array exists, and is not empty.
When i try to do this thing in servlet
System.out.println(request.getParameter("name")); //it does print name
But when I try to print parameter vars it is always null.
Where did I go wrong?