Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

401 Error Code while connecting to a URL using URL class

 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I'm getting 401 status while connecting to an URL using the URL class...
The code is as below:



and the exception stacktrace is as below....



Could some one please help me out in resolving this error...

Many Tahnks,
K.Chandra...
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
401 simply means you have no authorization ...
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to implement authorization in this scenario.?
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe this tutorial would help (although I didn't go through it thoroughly but it seems helpful)...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic