After spending too much time on ProxySelectorRoutePlanner, here is
what I have discovered.

Note this is for a Java application not an applet.

 If you do not use System.setProperty("java.net.useSystemProxies",
"true"); in your program Java will NOT use a proxy no matter how it is
configured.
 I used the Java control panel to set it to use browser settings and
when that did not work I set the proxy config in the Java control
panel.
 This code > DefaultHttpClient httpclient = new DefaultHttpClient();
> ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(
>         httpclient.getConnectionManager().getSchemeRegistry(),
>         ProxySelector.getDefault());
> httpclient.setRoutePlanner(routePlanner);
 makes no difference either.

If you use System.setProperty("java.net.useSystemProxies", "true"); in
your program here is what happens.
If the Java control panel is set to use browser settings it gets the
proxy settings from the browser. Yeah!
If the Java control panel is set to use proxy config in the control
panel is uses that.

The code that loads icons from a server or uses HTMLEditorKit USES the
proxy and works fine.

Code that uses HTTPClient ends up getting hung up because the low
level tcp code tries to use a SOCKS proxy not an HTTP proxy.
It connects to the HTTP proxy, sends some kind of request, and waits
FOREVER for the reply from what it thinks is a  socks proxy.

Why does the HTMLEditorKit work the way it is supposed to and the
HTTPClient does not?
I would think that eventually they would both get down to the same
Java tcp code.

I would be willing to look at this some more if anyone has any suggestion.

I would really like to be able to get proxy info from the browser as I
would rather not have an end user try to figure out how to config the
proxy parms.

THanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to