Trivial Java code to try an HTTP connection to a URL. In particular, this can be useful to see whether your Java environment and its SSL/TLS configuration will successfully connect to an https URL.

Java class

See TestHttp.

Run it like:

java -Djavax.net.ssl.trustStore=/config/trust.jks -Djavax.net.ssl.trustStorePassword=$TRUST_PASSWORD TestHttp https://example.com

JSP

JSP you can deploy or create in your Java server environment:

See HttpTest.jsp