I'm using @ResponseBody to get the json to Browser.I could get the data,but now if I try getting array of Strings or list of Strings then I get the following
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().
Why the above status?
The following is the Object I'm returning from controller
public class Temp
{
List<String> strArr=new ArrayList<String>();
public Temp()
{
strArr.add("1");
strArr.add("2");
strArr.add("3");
strArr.add("4");
System.out.println("temp="+strArr);
}
}
The following is the controller
@RequestMapping ( value = "/temp.htm" , method = RequestMethod.GET,produces="application/json")
public @ResponseBody Temp getTemp()
{
return new Temp();
}
I could get normal String data but if I try to get array or list of String I get the above status.
Please help