i using JQuery Ajax to call REST api in jsp but it return null no matter how i call but it can work in html. is there any way to solve this problem. Cant seem to find a solution in the net.
$(document).ready(function () {
    alert('ready');
    var accessKey = 'xkg8VRu6Ol+gMH+SUamkRIEB7fKzhwMvfMo/2U8UJcFhdvR4yN1GutmUIA3A6r3LDhot215OVVkZvNRzjl28TNUZgYFSswOi';
    var thisUrl = 'http://www.onemap.sg/API/services.svc/getToken?accessKEY=' + accessKey;
    $.ajax({
        type: "GET",
        url: thisUrl,
        dataType: 'application/json',
        success: function (data) {
            alert('data is:' + data.GetToken[0].NewToken);
        }
    });
    alert(thisUrl);
});
 
     
    