Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

pblm in establishing communication bt applet and its server over internet

Thread view: 
prabhu - 24 Mar 2006 14:57 GMT
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...
Roedy Green - 24 Mar 2006 19:51 GMT
> 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?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

prabhu - 25 Mar 2006 06:12 GMT
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.
Roedy Green - 25 Mar 2006 08:27 GMT
>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"
.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

prabhu - 25 Mar 2006 12:46 GMT
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."
Roedy Green - 25 Mar 2006 23:32 GMT
> 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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.