File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes HttpUrlConnection is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » I/O and Streams
Reply locked New topic

HttpUrlConnection is not working

enkhbat dash

Joined: Aug 12, 2008
Posts: 11
When I copy and paste in address bar, it works perfectly. But when I using HttpUrlConnection to connect it, it doesn't work. Here is my code.

When I copy and paste link to address bar, it's accessing web via get method right? And code uses get method, too. Any suggestion and help?

Be nice!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63872

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: HttpUrlConnection is not working
It's not a secret anymore!