The Artima Developer Community
Sponsored Link

Java Answers Forum
httpS request (enter UserInfo and password) ?

3 replies on 1 page. Most recent reply: Sep 4, 2003 12:22 AM by David

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
daniel

Posts: 2
Nickname: gilles
Registered: Sep, 2003

httpS request (enter UserInfo and password) ? Posted: Sep 1, 2003 2:35 PM
Reply to this message Reply
Advertisement
In order to retrieve the real time flow from my broker in my JAVA application I need to do a https request :

URL url = new URL("https://clients.dubus.fr/clients/nego/crtsdm.exe?code=tnu&origine=FR") ;

And of course I get java.io.IOException: Server returned HTTP response code: 401 when I open the stream.

The question is how to I setup the UserInfo and Password :
I can not use the 'setup' method of 'URL' because it is protected an 'URL' is final.
I also tried to append "&uid=....&uip=..." to the https request but it also does not work.

Thanks in advance for your help.


David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: httpS request (enter UserInfo and password) ? Posted: Sep 2, 2003 4:12 AM
Reply to this message Reply
You can't do it like that. You'll have to use the Secure Socket stuff.

mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: httpS request (enter UserInfo and password) ? Posted: Sep 3, 2003 8:56 AM
Reply to this message Reply
You'll have to use the Secure Socket stuff.[/]
tutorials of stuffs???

David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: httpS request (enter UserInfo and password) ? Posted: Sep 4, 2003 12:22 AM
Reply to this message Reply
A little bit of Googling helps:

http://www.google.com/search?q=Secure+Socket+Java

http://java.sun.com/products/jsse/
http://java.sun.com/products/jsse/FAQ.html

http://www.google.com/search?q=Java+using+HTTPS

http://www.infy.com/knowledge_capital/thought-papers/usingHTTPwith_java.pdf
http://www.javaworld.com/javaworld/javatips/jw-javatip96.html

Flat View: This topic has 3 replies on 1 page
Topic: Strange Situation Previous Topic   Next Topic Topic: https request in my JAVA application ? JSSE ?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use