pblm in establishing communication bt applet and its server over internet

Discussion in 'Java' started by prabhu, Mar 24, 2006.

  1. prabhu

    prabhu Guest

    HI ,
    I am Prabhakaran. I am having pblm in establishing communication
    bt applet and its server over internet. I am using socket programming
    for client server communication. I am using apache tomcat 4.0 for
    serving those applet classes. I am running Java server program in the
    same machine. Whenever i am testing applet /server communication in LAN
    it is working fine But in the internet ,the connection is not
    established bt applet and server.


    Friends,plz reply me soon. I am giving a public IP to my
    Server host & also I am opening all ports in server. Applet is
    downloaded in clinet host whenever the page is requested but connection
    is not established....


    Plz help me ..Reply soon

    Ur's friendly,
    Prbhu...
     
    prabhu, Mar 24, 2006
    #1
    1. Advertising

  2. prabhu

    Roedy Green Guest

    On 24 Mar 2006 05:57:39 -0800, "prabhu" <>
    wrote, quoted or indirectly quoted someone who said :

    > Whenever i am testing applet /server communication in LAN
    >it is working fine But in the internet ,the connection is not
    >established bt applet and server.


    The usual problem is the security sandbox is getting in the way. It
    thinks you are trying to talk to a server other than the one you were
    loaded from. To start, are you sure they are the same IP?
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Mar 24, 2006
    #2
    1. Advertising

  3. prabhu

    prabhu Guest

    HI Roedy,
    Thanks for reply. Ya server to which applet has to talk and the
    server from where it is loaded are the same host(IP) .

    Then what may be the problem.
     
    prabhu, Mar 25, 2006
    #3
  4. prabhu

    Roedy Green Guest

    On 24 Mar 2006 21:12:15 -0800, "prabhu" <>
    wrote, quoted or indirectly quoted someone who said :

    >HI Roedy,
    > Thanks for reply. Ya server to which applet has to talk and the
    >server from where it is loaded are the same host(IP) .
    >
    > Then what may be the problem.


    what is the error message/exception?

    Show some code.

    Do you know about the "downstream" problem? See
    http://mindprod.com/jgloss/applet.html
    and search for "downstream"
    ..
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Mar 25, 2006
    #4
  5. prabhu

    prabhu Guest

    Hi,
    I am getting "No host to route" exceception in the client
    side.
    I did a simple socket program

    Client side
    Socket client=new Socket("IP",9999);

    Server side

    ServerSocket ss=new ServerSocket(9999);
    Socket s=ss.accept();
    System.out.println("Connection Accepted");

    This is my coding . I am not getting "Connection accepted " in the
    server side. But all applet files are downloaded in the client browser.


    I am catching the exception in the client side and
    displaying it in one text box. It is displaying as
    "java.net.NoRouteToHostException: No route to host: connect."
     
    prabhu, Mar 25, 2006
    #5
  6. prabhu

    Roedy Green Guest

    On 25 Mar 2006 03:46:46 -0800, "prabhu" <>
    wrote, quoted or indirectly quoted someone who said :

    > Socket client=new Socket("IP",9999);
    >
    >Server side
    >
    > ServerSocket ss=new ServerSocket(9999);


    check your firewalls on both ends that they will let though that
    socket.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Mar 25, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jade
    Replies:
    3
    Views:
    933
    Roedy Green
    Aug 14, 2003
  2. Rune Andresen
    Replies:
    2
    Views:
    1,946
    Phil Powell
    Sep 17, 2003
  3. Prashant

    ListView checkbox pblm

    Prashant, Sep 1, 2003, in forum: C++
    Replies:
    1
    Views:
    632
    John Harrison
    Sep 1, 2003
  4. Pradeep
    Replies:
    0
    Views:
    383
    Pradeep
    Jun 8, 2006
  5. BAS
    Replies:
    0
    Views:
    111
Loading...

Share This Page