commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
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
> 

Jeroen,

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:

http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/proxy/

Hope this helps

Oleg

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message