Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

query on proxy connection in Java

 
ramakrishna budida
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There are two hosts ,primary host is there in our network with proxy enabled and secondary host is there in private network(out side our network). If we want to connect from primary to seconday, connection should pass through proxy.

Our probelm is that, when we use below java code, in general , if we use below code(Proxy.NO_PROXY) on primary , then conection shouldn't happen between primary and secondary.But connection is getting established. Is this known fact about Java?

Java Code:
URL url = new URL("http://hostname.mydomain.com/");
URLConnection conn = url.openConnection(Proxy.NO_PROXY);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic