I am calling a below jquery call
var url = "demo/getResponseData"
$.get(url,function(responseData, status){
 console.log("dtFetched:",responseData);
 alert("status" + status);
});
The back end spring boot code is as below
@RequestMapping(path="demo/getResponseData")
    public JSONObject getResponseData()  throws IOException, JSONException{
        System.out.println("================================Called from JavaScript");
        HttpClientManager httpClientMgr = new HttpClientManager();
        List<JSONObject> responseString= httpClientMgr.getResponseData();
        JSONObject object = new JSONObject();
         object.put("data", responseString);
        System.out.println("============OUTPUT====================" + responseString);
        //return responseString;
        return object;
    }
I am able to see the output in java console, however 'responseData' is empty. What is the problem with the code?
 
     
     
    