• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using https in java application

 
Abhisar Singh
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can I get a simple code code which sends and recive data using HTTPS....
 
Scott Selikoff
author
Saloon Keeper
Posts: 3905
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application software transmittedHTTPS is the same as HTTP. The difference is on the server level, not the application level, there's no code to demonstrate this unless you're programming a server itself.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the simplest case, just use javax.net.ssl.HttpsURLConnection instead of java.net.HttpURLConnection, and you should be good to go. Plenty of examples can be found using your trusted friend Google, in particular the very first link.
[ August 22, 2006: Message edited by: Ulf Dittmer ]
 
Abhisar Singh
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks Scott Selikoff

Ok say If have a simple HTML form which is sending data to a servlet.. How can I tell server to user HTTPS to transmit that data....
 
Scott Selikoff
author
Saloon Keeper
Posts: 3905
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a "https" in the url to the servlet.
 
Abhisar Singh
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ulf Dittmer & Scott Selikoff
 
amarnath nalumachu
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try HttpClient from Apache Commons project...It is more advanced and easier that URLConnection ...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic