This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using https in java application

 
Abhisar Singh
Greenhorn
Posts: 16
  • 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: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • 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
Posts: 42969
73
  • 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
  • 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: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ulf Dittmer & Scott Selikoff
 
amarnath nalumachu
Greenhorn
Posts: 10
  • 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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic