P
Paul Taylor
Hi,
I have written an application and I would like it to work on networks
protected with a proxy server. I am using the following lines of code to
set the proxy server:
System.setProperty("http.proxyHost", "192.168.1.61");
System.setProperty("http.proxyPort", "7867");
At the moment, the 192.168.1.61 host doesn't exist on my network, so I
expect my application to time out.
Without the above two lines of code, web access is less than a second. My
app is getting data directly. But with the above two lines of code web
access occurs in about 4 seconds. It looks like my app looks for the
proxy (for about 3 seconds), doesn't find it, so goes directly.
Is this how java handles proxy servers, going directly if no proxy
is found, or am I doing something wrong?
Thanks,
Paul.
I have written an application and I would like it to work on networks
protected with a proxy server. I am using the following lines of code to
set the proxy server:
System.setProperty("http.proxyHost", "192.168.1.61");
System.setProperty("http.proxyPort", "7867");
At the moment, the 192.168.1.61 host doesn't exist on my network, so I
expect my application to time out.
Without the above two lines of code, web access is less than a second. My
app is getting data directly. But with the above two lines of code web
access occurs in about 4 seconds. It looks like my app looks for the
proxy (for about 3 seconds), doesn't find it, so goes directly.
Is this how java handles proxy servers, going directly if no proxy
is found, or am I doing something wrong?
Thanks,
Paul.