www.webdeveloper.com
Results 1 to 3 of 3

Thread: troubleshooting help jquery/ajax/json no http response

  1. #1
    Join Date
    Dec 2010
    Posts
    2

    troubleshooting help jquery/ajax/json no http response

    Hi everyone I have a website uploaded into apache tomcat the code is shown below this website suppose to retrieve json data from other server (both servers have the same domain) for some reason the other server is not responding as I'm getting the error message "handshake didntgo through" firebug net pannel shows no response header also the apache and the other server are on the same domain. Can you please provide a feedback or clue on how to troubleshoot this? is there anything with ajax cause it seems it is not sending ?dose the ajax parameters need to be in spacific order?

    Java script code:-

    Code:
    $(document).ready( function(){ var home_add='http://mywebsite.net:3300/gateway'; $('#handshake').click(function(){      alert(" sending json data");                       $.ajax({                 /* start ajax function to send data */                            url:home_add,                           type:'POST',                           datatype:'json',                           contenttype:'text/json',                           error:function(){ alert("handshake didn't go through")}, /* call disconnect function */                           data:{                           "supportedConnectionTypes": "long-polling",                           "channel": "/meta/handshake",                           "version": "1:0"                           },                           success:function(data){                           $("p").append(data+"<br/>");                            alert("sucessful handshake");                            }                                               })      })});
    firebug time line shows DNS lookup, connecting and waiting there is no sending nor receiving. the request header is the following but there is no response

    Hostmywebsite.net:3300 User-AgentMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 CentOS/3.6-2.el5.centos Firefox/3.6.13 Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Languageen-us,en;q=0.5 Accept-Encodinggzip,deflate Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive115 Connectionkeep-alive Originhttp://127.0.0.1:8080 Access-Control-Request-Me...POST

    Thank you in advance
    ls19

  2. #2
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    based on your firebug observations I'd say your using the wrong port for what your trying to do or the opposing server needs to be looked at in regards to why it is not responding maybe a firewall issue? perhaps you need to add a firewall rule on your router or the server itself to allow port 3300 to communicate.

  3. #3
    Join Date
    Dec 2010
    Posts
    2
    but if the other server is the problem why firebug is not showing apache tomcat sending data it should at least be sending the data, it shows that it is doing dns lookups, connecting and waiting but it dose not show json data being sent that what confuses me. Thanks for your reply

    ls

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles