Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2725 > unrolled thread
| Started by | ckarunprakash@gmail.com |
|---|---|
| First post | 2013-06-18 22:17 -0700 |
| Last post | 2013-06-30 22:16 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.java.help
HTTP Error 407 Proxy authentication required ckarunprakash@gmail.com - 2013-06-18 22:17 -0700
Re: HTTP Error 407 Proxy authentication required Roedy Green <see_website@mindprod.com.invalid> - 2013-06-19 13:01 -0700
Re: HTTP Error 407 Proxy authentication required Lothar Kimmeringer <news200709@kimmeringer.de> - 2013-06-30 22:15 +0200
Re: HTTP Error 407 Proxy authentication required Lothar Kimmeringer <news200709@kimmeringer.de> - 2013-06-30 22:16 +0200
| From | ckarunprakash@gmail.com |
|---|---|
| Date | 2013-06-18 22:17 -0700 |
| Subject | HTTP Error 407 Proxy authentication required |
| Message-ID | <4e278766-6a91-48f5-860c-05ab188abe4b@googlegroups.com> |
I am trying to access the url by using this code
System.setProperty("http.proxyHost", "111.88.15.108");
System.setProperty("http.proxyPort", "8002");
System.setProperty("http.proxyUser", "user");
System.setProperty("http.proxyPassword", "password");
URL oracle = new URL("http://www.google.com/");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
This is working fine in my window machine but this is not working in linux machine. i am getting eror like this
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 407 for URL: http://www.google.com/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at com.yahoo.Connection.main(Connection.java:31)
Even proxy settings are correct and i tried like this also
java -Dhttp.proxyHost="111.88.15.108" -Dhttp.proxyPort="8002" -Dhttp.proxyUser="user" -Dhttp.proxyPassword="password" -jar yahoo_test3.jar
But Same Error and i tried to set the export http_proxy= in /etc/profile but no use
Any idea where it is going wrong.
[toc] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2013-06-19 13:01 -0700 |
| Message-ID | <7c34s8hc982oopvk7olt9noocphcnmur9t@4ax.com> |
| In reply to | #2725 |
On Tue, 18 Jun 2013 22:17:24 -0700 (PDT), ckarunprakash@gmail.com wrote, quoted or indirectly quoted someone who said : >Any idea where it is going wrong. I have some sample code. see http://mindprod.com/jgloss/authentication.html -- Roedy Green Canadian Mind Products http://mindprod.com Getting information off the Internet is like taking a drink from a fire hydrant. ~ Mitch Kapor 1950-11-01
[toc] | [prev] | [next] | [standalone]
| From | Lothar Kimmeringer <news200709@kimmeringer.de> |
|---|---|
| Date | 2013-06-30 22:15 +0200 |
| Message-ID | <1wbdqqj8jbrw2.dlg@kimmeringer.de> |
| In reply to | #2726 |
Roedy Green wrote:
> On Tue, 18 Jun 2013 22:17:24 -0700 (PDT), ckarunprakash@gmail.com
> wrote, quoted or indirectly quoted someone who said :
>
>>Any idea where it is going wrong.
>
> I have some sample code.
>
> [URL to own website]
Actually, no. HTTP-Basic-Authentication has nothing to do with
Proxy-Authentication
Regards, Lothar
--
Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
[toc] | [prev] | [next] | [standalone]
| From | Lothar Kimmeringer <news200709@kimmeringer.de> |
|---|---|
| Date | 2013-06-30 22:16 +0200 |
| Message-ID | <1iqhk3zmf97ha.dlg@kimmeringer.de> |
| In reply to | #2725 |
ckarunprakash@gmail.com wrote:
[Proxy Authentication]
> This is working fine in my window machine but this is not working
> in linux machine. i am getting eror like this
>
> Exception in thread "main" java.io.IOException: Server returned
> HTTP response code: 407 for URL: http://www.google.com/ at
[...]
> Any idea where it is going wrong.
Is the Proxy a Windows based one? If yes, it might only
accepts NTLM-authentications that aren't supported by all
Java versions.
Regards, Lothar
--
Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.help
csiph-web