Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

getting web pages behind the proxy server

  Asked By: Alma    Date: Jun 08    Category: Java    Views: 1099
  

I wrote a java program to get a content of a URL given. It is working fine for
internal URLs. But if i try to access some web pages benind my proxy server
(say http://www.yahoo.com) it is not working. So i set http.proxyHost and
http.proxyPort properties of jvm. Now it is throwing "407 proxy authorization
error". It is due to my proxy needs a username and password. I do not how to
pass proxy user name and password. Can some body help me out to solve this
problem.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Pravat Jainukul     Answered On: Jun 08

You can try:

System.setProperty("http.proxyUser", "myuser");
System.setProperty("http.proxyPassword", "mypassword");

If it doesn't work, see the following article:

www.javacoding.net/.../passproxy.html

 
Answer #2    Answered By: Rocco Anderson     Answered On: Jun 08

thats a nice things that u've told, I never knew that and thought that
bypassing proxy  mite be a hell of a task.. seems pretty simple!

 
Didn't find what you were looking for? Find more on getting web pages behind the proxy server Or get search suggestion and latest updates.




Tagged: