Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7638061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:04:57+00:00 2026-05-31T08:04:57+00:00

$.getJSON(http://localhost:8080/v1/message, function(data) { console.log(data); alert(message+data);//this alert stmt is displayed it means that the service

  • 0
$.getJSON("http://localhost:8080/v1/message", 

  function(data) {
    console.log(data);
      alert("message"+data);//this alert stmt is displayed it means that 
              the service call is getting executed 
    });

service method

@RequestMapping(method = RequestMethod.GET,
        value = "/message" )
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public String message()
{
    return "jasdknsd";

 }

I am getting response of this call as null please help me out if I am doing something wrong in the service method and I have both of them in same network because of which I am not using callback

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:04:59+00:00Added an answer on May 31, 2026 at 8:04 am

    Connection to localhost is not supported.

    http://code.google.com/p/android/issues/detail?id=133

    127.0.0.1 is the emulated system’s own loopback interface, not the one running on
    your host development machine.

    within the Android system, one should use 10.0.2.2 which is an alias specifically
    setup to contact your host 127.0.0.1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$.getJSON('http://twitter.com/followers/ids.json?screen_name=' + query1 + '&callback=?', function (data) { console.log('JSON data string 1 is: '
I have the following jquery in my code $j.getJSON(http://localhost:8080/WWTestHarnessWEB/ReadersToolkitFinalController.htm?jsoncallback=?, {'uID': 1}, function(data){alert(data);}); The json
I have the following code snippet: $.getJSON(http://localhost:8080/images, function(data) { var items = []; $.each(data,
This works fine: $.getJSON(http://localhost:59396/xxxWeb/ CarouselHandler.ashx?action=getproducts&ids= + ids, function(data) { carousel.size(allProductIDs.length); if (numberOfImagesLeftToShow < numberOfImagesToDisplay)
I call $.getJSON('http://localhost:8000/polls/?callback=?', function(data) and recieve an error: Error: parsererror errorThrown: jQuery16103397698865741826_1320825997345 was not
$(function(){ $.getJSON('http://ws.audioscrobbler.com/2.0/?method=user.getweeklyartistchart&user=ElicitBelief&api_key=25135a535781328243f9e31968abc14&format=json', function(data) { alert(data) }); }); Firebug says: GET http://ws.audioscrobbler.com/2.0/?method=user.getweeklyartistchart&user=ElicitBelief&api_key=25135a535781328243f9e31968abc14&format=json 200 OK 144ms
$.getJSON('ajax_popup.php', function(data) { var popupDiv = decodeURIComponent(data.data); $('body').append( popupDiv ); }); This piece of
UPDATE 3 var local = 'http://localhost:1163/CustomerService.svc/getcustomer?method=?'; var dev = 'http://yourserver.com/CustomerService.svc/GetCustomer?method=?'; $.getJSON(dev, function (customer) {
Jquery Code <script type=text/javascript> $(document).ready(function() { $.getJSON(http://localhost/index.php/upload/history,function(data) { $.each(data.images, function(i,data) { $('#recent').html( '<img src=/t/'
String.prototype.getLanguage = function() { $.getJSON('http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q=' + this + '&callback=?', function(json) { return json.responseData.language; });

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.