• Post Reply Bookmark Topic Watch Topic
  • New Topic

URL reading problem

 
Sivaraman Lakshmanan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am trying to get the stream of an URL resource using java.net.URL. When I give the URL as below

The above code throws HostNotFound Exception. But if I access the same URL from the IE browser I am getting the page displayed.

Can someone help me on this

Regards,
Sivaraman.L
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check example here.
 
Sivaraman Lakshmanan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I found that I am inside a fire wall. I am able to access thro browser becz it goes thro a Proxy server. Is there anyway to route my java URL reading thro the proxy server

Regards,
Sivaraman.L
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the I/O forum.
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a gander at Java Networking and Proxies from the J2SE release notes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!