Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > pblm in establishing communication bt applet and its server over internet

Reply
Thread Tools

pblm in establishing communication bt applet and its server over internet

 
 
prabhu
Guest
Posts: n/a
 
      03-24-2006
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...

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      03-24-2006
On 24 Mar 2006 05:57:39 -0800, "prabhu" <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
 
prabhu
Guest
Posts: n/a
 
      03-25-2006
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.

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-25-2006
On 24 Mar 2006 21:12:15 -0800, "prabhu" <(E-Mail Removed)>
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.
 
Reply With Quote
 
prabhu
Guest
Posts: n/a
 
      03-25-2006
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."

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-25-2006
On 25 Mar 2006 03:46:46 -0800, "prabhu" <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help. Getting a An error has occurred while establishing a connectionto the server. When connecting to SQL Server 2005, this failure may be causedby the fact that under the default settings SQL Server does not allow remote aboutjav.com@gmail.com ASP .Net 0 05-03-2008 12:43 PM
Implementing Provider - Pblm with username Pradeep ASP .Net 0 06-08-2006 12:55 PM
Applet - server communication - edited code on the applet side - problem! Rune Andresen Java 2 09-17-2003 06:26 PM
ListView checkbox pblm Prashant C++ 1 09-01-2003 12:00 PM
applet to applet communication over lan Jade Java 3 08-14-2003 09:41 PM



Advertisments