I am new to jquery. I cannot access java based web services by making ajax call.
My code for ajax call is something like this :
$.ajax({
        type: "POST",
        url: url,
        data: parameters,
        contentType: 'application/json; charset=utf-8',
        dataType:"json",
        headers: {
                Accept: "application/json",
                "Access-Control-Allow-Origin": "*"
        },
        success: function(data, textStatus, jqXHR) {
          alert('Success');
        },  
        error: function(jqXHR, textStatus, errorThrown){
          alert('Failure');
        }
});
I am getting error : XMLHttpRequest cannot load "server url. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Web service response while accessing via rest client on browser is something lie this : Status Code: 200 OK Content-Type: application/json Date: Wed, 03 Sep 2014 09:42:32 GMT Server: Apache-Coyote/1.1 Transfer-Encoding: chunke " Any help is greatly appreciated Thanks in advance
 
     
     
    