This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Applets and the fly likes Connection timed out when server is present in a far off place Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Connection timed out when server is present in a far off place" Watch "Connection timed out when server is present in a far off place" New topic
Author

Connection timed out when server is present in a far off place

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10242
    
168

We have a web application on JBoss-3.2.3. It makes use of Applets. To paint the applet, a request is sent to a server using a HttpURLConnection. Evertyhing works fine when the browser(client) and the server are on the same network. However, if the client(browser) is in Australia and the server in India(i.e. long distance between server and client), then the Applet crashes with a Connection timed out exception. Any solution for this?
The code looks something like:



[My Blog] [JavaRanch Journal]
Dave Robbins
Ranch Hand

Joined: Sep 16, 2003
Posts: 131
checkout setReadTimeout
it's in the parent class URLConnection

Dave
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Connection timed out when server is present in a far off place