i'm using jquery ,jersey and json. when i try to call a post service i receive this error
Origin null is not allowed by Access-Control-Allow-Origin. undefined * Error: NETWORK_ERR: XMLHttpRequest Exception 101
My client code
$.ajax({url: jurl, type: 'POST', dataType : 'json', headers: {accept:"application/json"},data: inData , cache : false, async : false, contentType : "application/json; charset=utf-8",
My server Code
@POST
@Path(ReferentialPath.PLAYER_RESOURCE_PATH)
@Consumes(MediaType.APPLICATION_JSON)
public Response createPlayer(CreatePlayerIn cPlayer) {
try {
String res = dao.create(player);
UriBuilder ub = uriInf.getAbsolutePathBuilder();
URI createdUri = ub.path(res).build();
return Response.created(createdUri).build();
} catch (Exception e) {
}
}
Would anybody tell me what could be the problem