Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing servlet in HTTPS mode  RSS feed

 
R Ramesh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I need to access a servlet through HTTPS call. I need to pass some value to that servlet, after I open a connection to that url.

Below is the code i had written.

String str = "Hello From client..";
URL url = new URL("https://iportxml-tester/xml_receiver");
HttpsURLConnection urlConnection = (HttpsURLConnection)url.openConnection();
urlConnection.setDoOutput(true);
OutputStream os = urlConnection.getOutputStream();
byte b[] = str.getBytes();
os.write(b);
os.flush();
os.close();

My question is :

1. Is the data transfered is secure and not hacked by any one?
2. Is there any other way to make more secure call?

Note: My vendor says since Iam accessing their URL through HTTPS, they told it is secure connection and the data transfered is also secured.


Thanks for the help in advance.
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Data transfered secure so you do not need to encypt them additionally. If you are concerned about authentication, then you can use double SSL setting an additional certificate which your container will trust.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!