I am trying to send a javascript array to Spring MVC controller..But I am getting null value..
My javascript Code:
for (var n = 1; n < rowCount; n++) {
cells = rows[n].cells;
data.push([
cells[0].firstElementChild.checked,
cells[1].firstElementChild.value,
cells[2].firstElementChild.value,
cells[3].firstElementChild.value,
cells[4].firstElementChild.value
]);
}
$.ajax({
url: 'addDetails.html',
type:"POST",
data:
{promo : data}
My Spring MVC Controller Request Mapping:
@RequestMapping("/addDetails")
public @ResponseBody void addEntity(
@RequestParam(value="promo") List<String> promo) throws IOException {
I am not getting any value in Requestmapping for promo.Kindly help Me..Thank You!