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]

Reply via email to