|
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).
- 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));
- Configure JVM Custom Properties to set the protocol handler:
- Stop the Application Server
- Open the administrative console
- Select Application Servers > application_server_name
> Process Definition > Java Virtual Machine >
Custom Properties
- Add this "name/value" pair:
java.protocol.handler.pkgs/
com.ibm.net.ssl.internal.www.protocol
- Save the change
- 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 |
|
|
|
|
|
|