File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Accessing html pages through proxy needs Proxy authorization Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Accessing html pages through proxy needs Proxy authorization" Watch "Accessing html pages through proxy needs Proxy authorization" New topic
Author

Accessing html pages through proxy needs Proxy authorization

prabhusub
Greenhorn

Joined: Aug 17, 2001
Posts: 2
Hi,
I am accessing web pages from my java program,
I have specified the required details, but It doesn't work...
I have specified the below :
System.getProperties().put("proxySet", "true");
System.getProperties().put("http.proxyHost","1.2.3.4");
System.getProperties().put("http.proxyPort","80");
Also set the Autorization details as below :
String authString = "user assword";
String auth = "Basic " + new BASE64Encoder().encode(authString.getBytes());
conn.setRequestProperty("Proxy-Authorization", auth);
But when i try to access pages, I get the html displaying
:
HTTP Error 407
407 Proxy Authentication Required
Even after providing the correct user id and password..
While accessing through IE, I need to give the domain of the user,
in IE 4.0 user : <domain name>\<user name>
pass : <password>
Do I have to specify the domain name in the Authorization details, if so, how do I do that.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Accessing html pages through proxy needs Proxy authorization
 
Similar Threads
Sockets vs URL Based classes
HTTPURLCONNECTION
java.net.ConnectException: Connection refused: connect
URLConnection Doubts -- Urgent!!
My Application is not sending mail to external servers