commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <>
Subject Re: HttpClient and Applets
Date Wed, 02 Nov 2005 11:34:10 GMT
On Tue, Nov 01, 2005 at 10:06:05AM +0100, Jeroen Kransen (DT) wrote:
> Hello, 
> I have an applet that has to communicate with the originating server
> through HTTP. It has to send and retrieve custom data, through GETs and
> (if possible) POSTs. I am using HttpClient (I am open for suggestions on
> that), which works well in a direct connection. However, when I am
> behind a proxy, I get a AccessControlException. I could explain this by
> the fact that the proxy server is not the originating server, and that
> by specification I am only allowed to contact the originating server.
> But I really don't want to bother about things like proxies at all. What
> I really want is that the Applet transparently hooking on to the browser
> settings for the proxy. The only possibilities I see now to contact the
> originating server Applet-wise is through Applet.getAudioClip(),
> .getImage(), .getAppletContext().showDocument(), but none of this is
> what I want.
> I'm sure I'm not the only one who wants to do something like this.
> There's probably either a simple solution or it's just plain impossible.
> I hope to hear it either way.
> Jeroen Kransen


The AccessControlException is thrown by the AccessController to
indicate that a requested access (to a critical system resource such as
the file system or the network) is denied. This problem has nothing to
do with HttpClient

You may want to take a look at the classes (below) to see how
a (limited) proxy setting auto-detection could be implemented:

Hope this helps


> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message