Use IBM JSSE to make https calls to external Web sites
 Technote (troubleshooting)
 
Problem(Abstract)
In IBM® WebSphere® Application Server, deployed application throws MalformedURLException: unknown protocol: https exception when making https calls to external Web sites.
 
Cause
By default, WebSphere Application Server does not set a protocol handler for outbound calls
 
Resolving the problem
Because the protocol handler for outbound calls is not set by default, users must configure a default protocol handler specifically. This can be accomplished in two ways:
  • Explicitly in the servlet code, or by
  • Configuring properties of the Java™ Virtual Machine (JVM).

  1. Specify protocol handler explicitly in servlet code:
    This is the preferred method.

    Properties properties = System.getProperties();
    String s1 = System.getProperty ("java.protocol.handler.pkgs");
    if (s1 == null)
     properties.put("java.protocol.handler.pkgs", "com.ibm.net.ssl.internal.www.protocol");
    else
     properties.put("java.protocol.handler.pkgs",
    "com.ibm.net.ssl.internal.www.protocol|".concat(s1));


  2. Configure JVM Custom Properties to set the protocol handler:
    1. Stop the Application Server
    2. Open the administrative console
    3. Select Application Servers > application_server_name > Process Definition > Java Virtual Machine > Custom Properties
    4. Add this "name/value" pair:
      java.protocol.handler.pkgs/
      com.ibm.net.ssl.internal.www.protocol
    5. Save the change
    6. Restart the Application Server.

NOTE: This is note applicable to WebSphere Studio Application Developer, since the WebSphere Test Environment is configured to use IBM JSSE for external https calls by default.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Security (JSSE/JCE)
Operating system(s): AIX
Software version: 5.1
Software edition:
Reference #: 1209234
IBM Group: Software Group
Modified date: Sep 16, 2005