Problem at json from web url
i using the json jquery in the WebApplication Java with this method and working:
- jQuery.ajax({
type: "GET",
url: "webresources/generic",
dataType: "json",
success: function(e){
alert("yes");
},
error: function(e){
alert("no");
}
});
however when i using this method outside the WebApplication Java not working
- jQuery.ajax({
type: "GET",
url: "http://localhost:8080/WebApplication21/webresources/generic",
dataType: "jsonp",
success: function(e){
alert("yes");
},
error: function(e){
alert("no");
}
});
can you tell me why?
also i using Restful in java as pattern