Using a GlassFish server running on port 8080, I can access http://localhost:8080/ws/
through my web browser.
But the webpage cannot be fetched using jQuery
, $.ajax
function:
$.ajax({
url: "http://localhost:8080/ws/",
type: "GET",
success: function() {alert("good");},
error: function() {alert("error");}
});
Every time, a message box with "error" is shown.
Here is what I captured using firebug:
But the response tag shows nothing:
Can anyone give me any suggestion about how to debug this?
NOTE:
- I have try to use
error: function(request, status, error)
, but nothing useful is fetched. - Using Wireshark to capture loopback HTTP packets, I can see that all the response is there, but not shown by firebug as illustrated above.