A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Bypass proxy to access local network URLs
Joined: Oct 07, 2001
Feb 15, 2005 13:04:00
I have a web application deployed on application server Oracle 9i AppServer -I don't think the application server has
anything to do with my problem-, it calls other web application through HTTP, on the local network, the other application
servers are hosted on windows platform and/or Unix platform.
All these machine can access Internet through proxy server, but there are no proxy or firewalls between them, so everything
is openned between the machines in the local network.
When I try to connect from one machine to another using the following code, I find that it always request proxy
authentication, which I would like to bypass.
The error says: http request returned error code 407
public class UrlConnector
public void connect(
url,String params, String values )
URL l_URL = new URL(url);
URLConnection l_URLConnection = l_URL.openConnection();
PrintWriter l_PrintWriter = new PrintWriter(l_URLConnection.getOutputStream());
String l_szParams ="";
BufferedReader l_BufferedReader = new BufferedReader(new InputStreamReader(l_URLConnection.getInputStream()));
String l_szResponseLine = "";
for ( l_szURLResponse = "";
(l_szResponseLine = l_BufferedReader.readLine()) != null;
l_szURLResponse = l_szURLResponse + l_szResponseLine );
I found that what I need is similar to setting in Internet Explorer to bypass proxy for addresses starting with .....
I don't know how to apply this to my code?
I'm using JDK 1.3.1
Anyone can help, I'm open to use any libary that overcome this problem.
Thanks, in advance
SCJP 1.2, SCBCD 5
Joined: Feb 20, 2001
Feb 15, 2005 19:42:00
I believe the system property you're looking for is http.nonProxyHosts. You can find out more at...
James Carman, President<br />Carman Consulting, Inc.
Joined: Oct 07, 2001
Feb 16, 2005 00:12:00
Thanks very much it worked great
Thanks for fast reply
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Bypass proxy to access local network URLs
Simulating Post in Java code.....
Imp-How to execute a JSP file from java main
help: need help for post
How create URL object with GET parameters?
HTML form created by Java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014