Error Reading from the server.

Hi,When I try to connect to a remote server, its not responding. I tried using Socket class, URLConnection, Proxy... and many other methods, but all were in vain. So, can anyone please suggest anyway to do this or when I did this what could have been the problem.
[277 byte] By [Vive_JavaNETa] at [2007-11-27 4:57:00]
# 1
Was the server running at the host and port you specified? Can you ping that host from the client? Can you telnet to the host:port? What exception was thrown? What was printed in your stack trace?
ejpa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 2

I cannot ping to the remote server.

This is the code I've written for example....

import java.net.*;

import java.io.*;

class WebSiteReader1

{

public static void main(String args[])

{

try

{

InetAddress ip=InetAddress.getByName("www.orkut.com");

//Socket S=new Socket(ip,8080);

System.out.println(ip);

URL url=new URL("http://www.yahoo.com");

URLConnection urlcon=url.openConnection();

urlcon.connect();

}

catch(Exception e)

{

e.printStackTrace();

}

}

}

The Stack trace is too long.

Vive_JavaNETa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 3

> I cannot ping to the remote server.

If you can't ping the server you can't do anything else with it either. Talk to your netadmin.

> The Stack trace is too long.

Too long compared to what?

Well my time is too short to waste on nitwits who won't provide information when requested. I asked you five questions and you've answered one of them.

ejpa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 4
If u didnt want to provide me with the information, you should not have replied on the topic either. I am not a software engineer ... as u might be. I am a beginner so I expected a lot better reply.... Than what u said!!
Vive_JavaNETa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 5
Surely it is obvious even to a beginner that nobody can provide you with the information you need if you don't provide the information that they need to do so?
ejpa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 6
If you want our help, you must make it easy for us to help you.Help us help you, you know?And if you can't ping a server, it's very likely you can't do anything else with it either.
-Kayaman-a at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 7
Actually you can also refer to the code I've given!!
Vive_JavaNETa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 8
Say, I am on a LAN and can ping to any server on it!! And it is an http server configured as IIS. If I can ping it... will I be able to access its resources?I've already said... i am using j2sdk1.4
Vive_JavaNETa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 9
> If I can ping it... will I be able to access its resources?No, if you can ping it, it means it responds to ping and is not offline. If you want to know whether it responds to HTTP requests, you can try connecting to port 80 (or whatever port the server is running on).
-Kayaman-a at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 10
the server is running on the port 80. I am trying to access the resources of the remote host which i pinged to. Have u got wht exactly i am trying to do?
Vive_JavaNETa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...
# 11
I got it hours ago: 'If you can't ping the server you can't do anything else with it either. Talk to your netadmin.'
ejpa at 2007-7-12 10:12:20 > top of Java-index,Java Essentials,Java Programming...