I'm making a POST request via jQuery Ajax:
$.ajax({
type: "POST",
url: opts.save_url,
data: $(ul_obj).serializeFormList() + "&form_id=" + form_db_id,
});
The $(ul_obj).serializeFormList() creates a 2D array of request params.
Here's the screengrab of the params passed to the Spring MVC controller:

Now when I handle this in the Controller I get 404 Bad Request for frmb[][]
Here's the code:
public @ResponseBody String saveData(@RequestParam(value= "form_id", required = true) String formId,
@RequestParam(value= "frmb", required = true) String[][] formArray) {
//Content removed for brevity
}
What is the exact way to handle this request data? Please guide me. I'm stuck real bad.
As I see you are concatenating the parameters
"&form_id=" + form_db_id
you can do the same for "frmb"
frmb=1,2&frmb=2,3
so when you try get the String [][] using
@RequestParam(value= "frmb", required = true) String[][] formArray)
you will get
formArray = [[1,2],[2,3]]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With