• Post Reply Bookmark Topic Watch Topic
  • New Topic

sockets and proxys again...  RSS feed

Paul Davies
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this old chestnut again...(BTW I have searched the archives...)
I'm trying to connect to a remote server (on the www) from a Weblogic8.1 server using java 1.4.1_03-b02. There is a firewall between my server and the www, so I'm using a proxy server.
my code is as follows:
Properties systemSettings = System.getProperties();
systemSettings.put("proxySet", "true");
systemSettings.put("proxyHost", proxyHoseAddress);
systemSettings.put("proxyPort", proxyHosePort);
Socket s = new Socket(targetServerIP, targetServerPort);
in = new DataInputStream(s.getInputStream());
out = new DataOutputStream(s.getOutputStream());
I have alse tried 'http.proxy...', as well as opening an 'HttpURLConnection' instead of a 'Socket', none of which have worked.
I have talked to out network admin guys, and it seems that Java is always trying to talk directly to target server, and ignoring the proxy server.
any ideas...?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!