Here's my ajax call:
$.ajax({
type: 'GET',
url: contextPath + '/test/location',
data: {'objectValues': object.objectValues },
datatype: 'json',
success: function( data ) {
var obj = jQuery.parseJSON( data );
}
});
it gives me this URL:
http://localhost:8080/test/location?objectValues[]=1234567890&objectValues[]=0987654321
My Spring method signature looks like this:
@RequestMapping(value = "/location", method=RequestMethod.GET)
public @ResponseBody String loadLocation(@RequestParam(value="objectValues", required=false) String[] objectValues)
Why do I keep getting null for the value of objectValues?