Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java and proxies

Reply
Thread Tools

Java and proxies

 
 
Paul Taylor
Guest
Posts: n/a
 
      06-28-2005
Hi,

I have written an application and I would like it to work on networks
protected with a proxy server. I am using the following lines of code to
set the proxy server:

System.setProperty("http.proxyHost", "192.168.1.61");
System.setProperty("http.proxyPort", "7867");

At the moment, the 192.168.1.61 host doesn't exist on my network, so I
expect my application to time out.

Without the above two lines of code, web access is less than a second. My
app is getting data directly. But with the above two lines of code web
access occurs in about 4 seconds. It looks like my app looks for the
proxy (for about 3 seconds), doesn't find it, so goes directly.

Is this how java handles proxy servers, going directly if no proxy
is found, or am I doing something wrong?

Thanks,

Paul.

--
Remove _rem_ before replying by email.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database of open source HTTP proxies written in Java. Alan Kennedy Java 0 07-02-2009 03:53 PM
css and csm for load balancing (firewalls and proxies) cconnell_1@lycos.com Cisco 0 05-03-2006 08:28 PM
Scalable VOIP proxies for voice and video. sales@lanscapecorp.com VOIP 0 01-23-2006 06:42 PM
Java HTTP proxies fail open? Chris Smith Java 1 07-18-2005 11:51 AM
HttpURLConnection, Proxies and Authentication Roger Java 3 07-13-2004 01:53 PM



Advertisments