hi,
i am trying to develop country state ajax using spring 3.0 and jquery.
and i am using getjson method.
but i dont kow whether i am getting response from the controller or not callback function is not calling.
and my code
javascript
function checkAvailability() {
$.getJSON("countryajax.htm",function(data) {alert(data);});
}
and controller
@RequestMapping(method = RequestMethod.GET)
public @ResponseBody
List<
String> getStates() {
List<Item> itemlist = genericService.findItemsByListName("Country");
List<String> country = new ArrayList<String>();
for (Item cs : itemlist) {
country.add(cs.getName());
}
System.out.println(country.size());
return country;
}
and the control is going to controller and response is generating but i dont know it is returning or not.please tell me how to check it
thanks in advance