I've seen a couple of threads here about detecting proxy settings in applets
(ex: http://nagoya.apache.org/eyebrowse/ReadMsg?listId=128&msgNo=1884). In
case this helps someone out, Sun actually provided an API in 1.4 to let you
hook into the plugin's proxy detection logic. The code looks like this:
// Look around for the 1.4.X plugin proxy detection class... Without it,
cannot autodetect...
Class t = Class.forName("com.sun.java.browser.net.ProxyService");
com.sun.java.browser.net.ProxyInfo[] pi =
com.sun.java.browser.net.ProxyService.getProxyInfo(sampleURL);
if (pi == null || pi.length == 0) {
System.out.println("1.4.X reported NULL proxy (no proxy assumed)");
useProxy = false;
}
This code is from a post in the Sun forums:
http://forum.java.sun.com/thread.jsp?forum=30&thread=364342
I've done a small amount of testing and it appears to work. It even parses
proxy.pac files correctly.
Bruce.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]