Dear All
How can I set up the JDK/J2EE so that URLConnections
will make use of a Proxy. I want to create an URLConnection
from an URL like http://www.ibm.com. But I am sitting behind
a firewall with a proxy that can get through. How can I configure
my Java environment so that the proxy will be used in my
Servlet that will run in Catalina.
Best Regards
Discussions
Web tier: servlets, JSP, Web frameworks: How can a servlet use a URLConnection that will use a Proxy
-
How can a servlet use a URLConnection that will use a Proxy (1 messages)
- Posted by: Jan Burse
- Posted on: May 14 2002 05:02 EDT
Threaded Messages (1)
- How can a servlet use a URLConnection that will use a Proxy by Weston Aiken on May 14 2002 15:12 EDT
-
How can a servlet use a URLConnection that will use a Proxy[ Go to top ]
- Posted by: Weston Aiken
- Posted on: May 14 2002 15:12 EDT
- in response to Jan Burse
You need to set 3 system properties and the URLConnection will go through your proxy server.
proxySet
proxyHost
proxyPort
You can set them in your code...
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "your proxy host");
System.getProperties().put("proxyPort", "your proxy port");
or when you start the JVM...
java -DproxySet=true ....
Wes