[Logo]
Forums Register Login
how to read files from internet
if i post a txt file on the internet is it possible to make a program to read this file?
Yes: http://www.exampledepot.com/egs/java.net/ReadFromURL.html
Hi Guys,

I just tried your suggestion, I am getting the following exception after a couple of seconds:



I too want to know about this. Can anyone please help me out to resolve this exception? I am using a proxy server which requires authentication to access the internet. Is it anything to do with this?

Thanks for your help...!
 

zahid zubair wrote:I am using a proxy server which requires authentication to access the internet. Is it anything to do with this?



Quite likely yes. Here's a link to Sun's writeup about how to connect via proxy servers. It's possible that just implementing that will automatically deal with the authentication, but it depends on what platform your code is running on and what kind of proxy server it is and so on.
Hi,

Thanks for your response. I gone through it and was able to accomplish my task using the website given and some google search on java website.



However, I don't understand why the proxyType is set to 4, what does it mean?
 

zahid zubair wrote:
However, I don't understand why the proxyType is set to 4, what does it mean?



I don't see anything about that system property in the JDK Networking Documentation. Where did you find it?
The java.net.Proxy class is probably easier to deal with than the system properties. Have a look here for an example.
While I was receiving the HTTP 407 error when I tried the code in the url posted by you, I found the resolution in http://forums.sun.com/thread.jspa?threadID=500360
 

zahid zubair wrote:While I was receiving the HTTP 407 error when I tried the code in the url posted by you



I'm not Ulf or Paul
I can't find any references to the "http.proxyType" property. The links in that thread don't mention it. The original poster says he got it from another thread, but searching that forum only brings up his post. I think he imagined it.
Likewise there isn't anything about

in that documentation either.

You'll find that it makes no difference whether you use this system property or not, because it isn't used by any of the JRE code. It's a bogus property, in other words, which somebody thought up years ago and it's been copied from one internet site to another without anybody checking it.
Oh. Is it so!!! Thanks for making me aware guys. However, my code copying mistake might have made others aware as well.
They weren't very bright, but they were very, very big. Ad contrast:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 2305 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 27, 2018 02:59:26.