I have configured a Bobcat server on my local machine that listens to HTTP and HTTPS requests on ports 8000 and 8001 respectively.
While I can call a RESTful service using HTTP from a Java client -
URL url = new URL("http://localhost:8000/helloworld");
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
I am not able to call the same service on port 8001, using HttpsURLConnection objects. Do I need to configure SSL or get security certificates or something?
My main motive is to work on the RESTful service, I'm using a web client (JSP) to simply test the service. Can someone help me call the service endpoint using HTTPS?
Thanks.
Copyright Notice:Content Author:「divyanshm」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/14870163/restful-call-to-https-server-from-java-client