URLConnection works with ISDN while fails with 56K modem

Hi, all

Sorry for repeating again.

I encountered some problem, when I try code below in office with LAN internet connection, the code works fine. But when I try using 56k modem, it always fails.

I wonder what enhancement should I add into the code.

URL fourdUrl =new URL("http://www.asia1.com.sg");

URLConnection yc = fourdUrl.openConnection();

//seems code stop below when using 56K modem

BufferedReader bri =new BufferedReader(

new InputStreamReader(yc.getInputStream()));

String read=bri.readLine();

while (read!=null){.

...//continue read from webpage

}

I also tried one friend's suggest, put a

yc.setDoInput(true) after openConnection(). Still can't work. Could someone give me some light?

Thanks a lot.

[1145 byte] By [harvshen] at [2007-9-26 4:01:09]
# 1

Ask your Internet Service Provider(the one that you dial into using your 56 Kbps modem), whether your effectively behind a firewall or if there is any proxy though which you have to go through ?

If there is a proxy, you will have to specify http.setProxyHost and http.setProxyPort system parameters.

neville_sequeira at 2007-6-29 12:56:42 > top of Java-index,Archived Forums,Java Programming...
# 2

No, the headachy thing is when I tried a light weight site such as

http://www.singaporepools.com.sg/totolatest/toto.html

The code works fine with 56K modem. But when I tried

http://www.asia1.com.sg/

It fails. So I guess the problem maybe is the target http object is too large to get before timeout.

By the way, every ISP in Singapore only allow people access through proxy. I've already set it in IE.

> Ask your Internet Service Provider(the one that you

> dial into using your 56 Kbps modem), whether your

> effectively behind a firewall or if there is any proxy

> though which you have to go through ?

>

> If there is a proxy, you will have to specify

> http.setProxyHost and http.setProxyPort system

> parameters.

harvshen at 2007-6-29 12:56:42 > top of Java-index,Archived Forums,Java Programming...