Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 49962 invoked from network); 3 Nov 2005 08:55:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Nov 2005 08:55:25 -0000 Received: (qmail 63193 invoked by uid 500); 3 Nov 2005 08:55:20 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 63182 invoked by uid 500); 3 Nov 2005 08:55:20 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 63171 invoked by uid 99); 3 Nov 2005 08:55:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 00:55:20 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [134.96.188.26] (HELO mail.dfki.de) (134.96.188.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 00:55:14 -0800 Received: from mail.dfki.de (localhost.dfki.uni-sb.de [127.0.0.1]) by localhost (Postfix) with ESMTP id 87573E47C6 for ; Thu, 3 Nov 2005 09:54:52 +0100 (CET) Received: from [IPv6:::1] (dave.dfki.uni-sb.de [134.96.184.220]) by mail.dfki.de (Postfix) with ESMTP id 71B59E4751 for ; Thu, 3 Nov 2005 09:54:52 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v623) In-Reply-To: <672D3491DC68D3478BB72E1A1C4A0DCC687685@jason.holmes.nl> References: <672D3491DC68D3478BB72E1A1C4A0DCC687685@jason.holmes.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: <058c831ec21bd593c2e192f4db5f3f1a@activemath.org> Content-Transfer-Encoding: quoted-printable From: Paul Libbrecht Subject: Re: [HttpClient] HttpClient and Applets Date: Thu, 3 Nov 2005 09:54:49 +0100 To: "Jakarta Commons Users List" X-Mailer: Apple Mail (2.623) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The AppletContext class gives you this and you should use it. (getDocumentBase() or something such?) This will be the URL of the proxy, of course, which you expect to relay=20= your http call. paul Le 3 nov. 05, =E0 09:42, Jeroen Kransen (DT) a =E9crit : > Oleg, Paul, > > Thank you for your responses. I got it that the problem is not related > to HttpClient, but to the AccessController. And indeed I wrote the = host > name right, or it wouldn't work without proxy. :-) > > For sure I'll be very glad to be able to /detect/ the proxy settings, > and it looks like the classes you showed do that for me. However, I > doubt that /knowing/ the proxy settings will solve the issue, since I > already know the settings now. :-) > > My point was that I wonder if it will work at all, since the proxy = will > still be a different host than the one I downloaded the Applet from.=20= > The > existence of this PluginProxyTest suggests that it is useful in a Java > applet to detect (and use?) the settings, so my real question(s) is > (are): > > Dit anyone get an Applet contact the originating server successfully > through a Proxy, other than by downloading images and sounds? And more > specifically: by using HttpClient? Is there a more straightforward way > to do GETs (and if possible, POSTs) from an Applet instead of by using > HttpClient? > > Jeroen > >> -----Original Message----- >> From: Oleg Kalnichevski [mailto:olegk@apache.org] >> Sent: woensdag 2 november 2005 12:34 >> To: commons-user@jakarta.apache.org >> Subject: Re: HttpClient and Applets >> >> 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/httpclie >> nt/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 > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org