URLConnection.connect () doe not work !!!

Hello.

I am trying to access http pages using the class URL, to get an InputStream from the class URLConnection after connect () (using getInputStream()).

But it doesn't work !!!

I have tested with "file" protocol and it works.

I have tested with "localhost" web server address and it works.

But with http://www.tnrelaciones.com/anexo/laprensa/ (a real URL) doesn't work !!!

I have a "proxy" for my internet access. But it is working from my web browser...

I get a timeout error message

I don't know how to increase the time out counter.

I don't know how to give the proxie's information (port, name)

Could you help me?

[692 byte] By [empleado_de_altana] at [2007-9-30 18:14:26]
# 1
The timeout probably occurs because you have to use the proxy.Look here on the properties you can set to use a proxy: http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
Herko_ter_Horst at 2007-7-6 18:46:34 > top of Java-index,Administration Tools,Sun Connection...
# 2

Thanks for give me a hope...

But I do not know how to set up those properties.

url_connection.setRequestProperty ("http.proxyHost","intranet");

url_connection.setRequestProperty ("http.proxyPort","8080");

Does nothing !!!

How should I set up those properties ?

Previows message:

> The timeout probably occurs because you have to use

> the proxy.

>

> Look here on the properties you can set to use a

> proxy:

> http://java.sun.com/j2se/1.4.2/docs/guide/net/propertie

> .html

empleado_de_altana at 2007-7-6 18:46:34 > top of Java-index,Administration Tools,Sun Connection...