aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Java Url with proxy conf. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java Url with proxy conf." Watch "Java Url with proxy conf." New topic
Author

Java Url with proxy conf.

Tom Ngo
Greenhorn

Joined: Jun 08, 2005
Posts: 1
I am running java 1.4.2 and am using URL api to connect to an http address to download xml files. I am trying to incorporate proxy server configuration into this, does anyone here know how to add a proxy server via URL address or through the System property of a java vm?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

"tcn2k",

There aren't may rules that have been put into place here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
There's plenty of articles about this on the web, but if you're using HttpUrlConnection then you can just set the system properties

-DproxySet=true -DproxyHost=192.168.0.1 -DproxyPort=8080

To enable proxy server handling.

If you need authorization for the proxy server (a-la RFC2617 Basic style, then you'll need to manage that yourself along the lines of



I have no java certifications. This makes me a bad programmer. Ignore my post.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Java Url with proxy conf.