Using Tomcat 7 under Linux, this did the trick.
String certificatesTrustStorePath = "/etc/alternatives/jre/lib/security/cacerts";System.setProperty("javax.net.ssl.trustStore", certificatesTrustStorePath);System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
Under Linux, $JAVA_HOME
is not always setup, but usually /etc/alternatives/jre
points to $JAVA_HOME/jre