• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Communication with https

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to communicate with a https server using a core java code.
Please provide some leads or sample codes on how to approach this.

I would need to do some authentication with this server as well.

Please advise.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Jakarta HttpClient library is very handy for building HTTP clients of all kinds. Its user guide has pages on authentication and SSL.

If for some reason (which one?) you don't want to use 3rd party libraries, the standard java.net.URLConnection class also supports HTTPS, and here you'll find a description of how to do basic authentication with it.
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DO i need an authenticator to connect to https://verisign.com ?
What are the my proxy host and port? Why do i need to define these?
How do i define this? localhost and any random port?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An authenticator is not generally needed for HTTPS connections. It may be required if the server uses authentication, though. If one is required but not provided you should get an error message to that effect.

Whether or not a proxy is needed depends on your network setup. It, too, is not generally required by HTTP or HTTPS, irrespective of whether or not authentication is used.
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the code:


to connect to the boa url. But i get a connection timeout exception.

What am i doing wrong?
Please advise.
 
reply
    Bookmark Topic Watch Topic
  • New Topic