Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Proxy behavior freaky

Chandra Sekar
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I wrote a code similar to this,

URLConnection conn;
if(proxy != null)
conn = url.openConnection(proxy);
conn = url.openConnection();

I connect to the net using proxy. For the first time I provide the proxy and get connected. However, for the second time connection is being established even if I do not provide a proxy. From the next time connection without proxy fails. I checked with println statements to ensure that the right method is called. Why is this so?? I'm using JDK 6.0 BETA.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic