Getting an URL connection through proxy without setting System Properties

A

Arno Illmann

Hi all,

i've got a web application in a LAN, whose threads connect to different
URLs outside the LAN through a (Non-Windows) proxy, as well as reading
some URLs inside this LAN.

Thats why generally setting System.setProperty("proxy", "true") is not
possible. Or?

Using the libraries jakarta.apache.org/commons/httpclient or
www.innovation.ch/java/HTTPClient seems a simple way to solve the
problem but they are quite oversized to serve the simple purpose.

I would be very pleased about some hints.

Thanks in Advance,
Arno
 
A

Arno Illmann

.... setting

http.proxyHost (default: <none>)
http.proxyPort (default: 80 if http.proxyHost specified)
http.nonProxyHosts (default: <none>

http.nonProxyHosts indicates the hosts which should be connected too
directly and not through the proxy server. The value can be a list of
hosts, each seperated by a |, and in addition a wildcard character (*)
can be used for matching. For example:
-Dhttp.nonProxyHosts="*.foo.com|localhost".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,133
Latest member
MDACVReview
Top