Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 96613 invoked from network); 7 Jul 2006 05:41:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jul 2006 05:41:10 -0000 Received: (qmail 15954 invoked by uid 500); 7 Jul 2006 05:41:05 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 15920 invoked by uid 500); 7 Jul 2006 05:41:05 -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 15909 invoked by uid 99); 7 Jul 2006 05:41:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jul 2006 22:41:05 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=USERPASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [203.30.40.129] (HELO firewall2.elders.com.au) (203.30.40.129) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jul 2006 22:41:03 -0700 Received: from elders.com.au ([192.168.201.162]) by firewall2.elders.com.au (8.13.5/8.13.1) with ESMTP id k675ef3o044896 for ; Fri, 7 Jul 2006 15:10:41 +0930 (CST) (envelope-from Tony.Cooke@elders.com.au) X-SEF-Processed: 5_0_0_910__2006_07_07_15_10_40 X-SEF-CA8905A9-DEE5-4C4F-989B-67A01B8FD4A8: 1 Received: from Unknown [192.168.201.161] by adlspamgw - SurfControl E-mail Filter (5.2.1); Fri, 07 Jul 2006 15:10:34 +0930 Received: from firewall2.elders.com.au ([192.168.201.253]) by adlsmtpgw (SMSSMTP 4.1.9.35) with SMTP id M2006070715103401604 for ; Fri, 07 Jul 2006 15:10:34 +0930 Received: from ADLEMAILFE.elderslimited.com.au ([10.10.1.102]) by firewall2.elders.com.au (8.13.5/8.13.1) with ESMTP id k675eYCX044795 for ; Fri, 7 Jul 2006 15:10:35 +0930 (CST) (envelope-from Tony.Cooke@elders.com.au) Received: from ADLEX02.elderslimited.com.au ([10.10.1.208]) by ADLEMAILFE.elderslimited.com.au with Microsoft SMTPSVC(6.0.3790.1830); Fri, 7 Jul 2006 15:08:56 +0930 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: [commons vfs] ftp DefaultFileMonitor issue Date: Fri, 7 Jul 2006 15:08:55 +0930 Message-ID: <011FD2535DA6E54C9D44E0467956268A089B47CA@ADLEX02.elderslimited.com.au> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [commons vfs] ftp DefaultFileMonitor issue Thread-Index: AcahhrWXHTtyS/u9Tii2xxYv4bIgdAAAEafA From: "Tony Cooke" To: "Jakarta Commons Users List" X-OriginalArrivalTime: 07 Jul 2006 05:38:56.0423 (UTC) FILETIME=[A39C6370:01C6A187] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Mario. The problems is I think I need to use 2 different user IDs and passwords to get to the data. One to get past the proxy, the other to authenticate to the remote website. Can I use the FileSystemOptions example below to set up the proxy authentication and then use the http://user:pass@target.host.net/file.txt approach as well to get past the remote website's authentication? Ie. FileSystemOptions opts =3D new FileSystemOptions(); HttpFileSystemConfigBuilder.getInstance().setProxyHost(opts, "proxy.host.net"); HttpFileSystemConfigBuilder.getInstance().setProxyPort(opts, 8080); =20 =20 DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, you_user_authenticator); FileObject fo =3D VFS.getManager().resolveFile("http://user:passtarget.host.net/file.txt", opts); I hope you understand what I have written. Thanks for your help Mario. I do appreciate it. All the best, Tony -----Original Message----- From: Mario Ivankovits [mailto:mario@ops.co.at]=20 Sent: Friday, 7 July 2006 3:01 PM To: Jakarta Commons Users List Subject: Re: [commons vfs] ftp DefaultFileMonitor issue Hi Tony! > How can I set up commons-vfs (specifically HTTP) to use a proxy AND > authenticate to the site (which is password protected)? > =20 You can add the password to the url e.g. http://user:pass@target.host.net/file.txt or configure a user authenticator as shown below: FileSystemOptions opts =3D new FileSystemOptions(); HttpFileSystemConfigBuilder.getInstance().setProxyHost(opts, "proxy.host.net"); HttpFileSystemConfigBuilder.getInstance().setProxyPort(opts, 8080); =20 DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, you_user_authenticator); FileObject fo =3D VFS.getManager().resolveFile("http://target.host.net/file.txt", opts); I dont know if and how the user/pass stuff works with your proxy, please tell us your experiences afterwards. Ciao, Mario --------------------------------------------------------------------- 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