0

I am trying to check username and password through restful web-service. So I am using AJAX to call the URL from JSP. Web service is running on another machine and the IP address of that machine is 100.100.100.100. When I run this programme It shows

jqXHR.status = 0

When I run the web-service and this application locally replacing IP address 100.100.100.100 to localhost It is working. But When I call remote machine using IP address it is not working. Why is that? Anybody can help me? I also referred the question in stack overflow but it didn't work.

Network is good. Both machines connected to the same WiFi Router. When I put that URL (http://100.100.100.100:8080/WebService/rest/get/auth/abraham/123)

               $.ajax({ 
                    type: 'GET',
                    url:  "http://100.100.100.100:8080/WebService/rest/get/auth/abraham/123",
                    dataType: 'text',
                    success: function(data, textStatus, jqXHR) {
                        alert('success');
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                        alert('Login Error: ' + textStatus);
                        alert(jqXHR.status);
                        alert(errorThrown);
                    }
Gabriele Petrioli
  • 191,379
  • 34
  • 261
  • 317

0 Answers0