Scott Mueller wrote:
Thanks Oleg. Ok, so basically all normal applets should have your code
below. Setting the route planner to ProxySelectorRoutePlanner works the
same as not setting it at all if the browser has no proxy settings right?
Yes, it should.
Oleg
On Sun, Feb 22, 2009 at 8:09 AM, Oleg Kalnichevski <[email protected]> wrote:
Scott Mueller wrote:
Hi guys, I have a simple applet which is given a set of local files to
upload to my server using HttpClient and MultipartEntity. Basically when
someone uploads a GEDCOM file (genealogy data), the images are specified
as
local files. So I then present a signed applet to them to grab those
files
off their local filesystem. This is the least intrusive and simplest way
I
could think of to get these images from users.
So what do I do about proxy servers? Is there a way I can read from the
browser if and how their proxy configuration is setup and then transfer
that
information to HttpClient in the applet? Is it possible HttpClient does
this automatically?
Yes, it can. Configure HttpClient to use ProxySelectorRoutePlanner instead
of the DefaultHttpRoutePlanner.
---
DefaultHttpClient httpclient = new DefaultHttpClient();
ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(
httpclient.getConnectionManager().getSchemeRegistry(),
ProxySelector.getDefault());
httpclient.setRoutePlanner(routePlanner);
---
Oleg
Are there standard system properties I can read to deal
with this? Are there any other situations I should be aware of, like
proxy
servers, that might prevent images from being uploaded?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]