• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

prob with Jakarta HttpClient & HostConfiguration

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a method which opens up http connections to URLs outside our DMZ, and to hide the implementation details of our firewall I make the connection via a proxy. I've previously used the java.net.HttpURLConnection class, and specified a proxy by setting the httpProxy, httpProxy as system properties. The code to open the connection itself was fairly straightforward ('url' is a java.net.URL object);



However...another application has deployed into the same JVM where my application lives, and due to co-existence issues (insert long story here) I can no longer set these properties in the JVM. To try to just set the proxy on a connection by connection basis, I've changed my app code to use the Jakarta Commons project; I'm using the HttpClient class to create the connection, and then a HostConfiguration object to set the proxy details;



The proxy server/port are identical to the one I used before (when using HttpURLConnection, but I now get the following error from my server code when I tried to do the send;



Any help much appreciated,

Thanks, Greg
 
BWA HA HA HA HA HA HA! Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic