Access a password protected URL using Java code
0
Q:
Access a password protected URL using Java code
I am trying to access a URL using the HttpURLConnection in Java code. The URL is password protected. I have to authenticate our Lotus Domino server for accessing before even attempting to access the URL. How do I authenticate my Lotus Domino server to access the password protected URL using the HttpURLConnection? Can anyone give me any suggestions and/or explainations to accomplish this with some sample Java code?
ASKED: Apr 10 2008  5:16 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
430 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
For a secure connection use the 'HttpsURLConnection' instead (Notice the extra S after http) as this is the normal way connections for passwords are made. Then just submit your request.
Your request will mostlikely need username and password parameters set and it shhould then connect you.
Last Answered: May 25 2008  4:16 AM GMT by Ysrd   430 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0