Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-04-30 15:56:41 +0000
committerThomas Watson2014-04-30 15:56:41 +0000
commite96c48387b6a307fa2e1168aec695142717cb9ae (patch)
treec39b9c35fbe6a371a0f028c772031fb65cd73e4b
parentd1d73573bf7006585bf5d3e88c22a1cdf2d5d1a4 (diff)
downloadrt.equinox.bundles-e96c48387b6a307fa2e1168aec695142717cb9ae.tar.gz
rt.equinox.bundles-e96c48387b6a307fa2e1168aec695142717cb9ae.tar.xz
rt.equinox.bundles-e96c48387b6a307fa2e1168aec695142717cb9ae.zip
Servlet init
-rw-r--r--bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java
index 43448e25d..025ea4a79 100644
--- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java
+++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2014 Cognos Incorporated, IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
package org.eclipse.equinox.servletbridge;
import java.io.IOException;
+import java.lang.reflect.Method;
import java.util.StringTokenizer;
import javax.servlet.ServletException;
import javax.servlet.http.*;
@@ -63,6 +64,19 @@ public class BridgeServlet extends HttpServlet {
}
}
+ // Forces load of the SSLSocketFactory on the web-app context class loader
+ String initSSLSocketFactory = getServletConfig().getInitParameter("_initSSLSocketFactory"); //$NON-NLS-1$
+ if (!"false".equals(initSSLSocketFactory)) { //$NON-NLS-1$
+ try {
+ Class clazz = this.getClass().getClassLoader().loadClass("javax.net.ssl.SSLSocketFactory"); //$NON-NLS-1$
+ Method getDefaultMethod = clazz.getMethod("getDefault", null); //$NON-NLS-1$
+ getDefaultMethod.invoke(null, null);
+ } catch (Exception e) {
+ // best effort -- log problems
+ getServletContext().log("Bridge Servlet _initSSLSocketFactory - failed - " + e.getMessage()); //$NON-NLS-1$
+ }
+ }
+
String frameworkLauncherClassParameter = getServletConfig().getInitParameter("frameworkLauncherClass"); //$NON-NLS-1$
if (frameworkLauncherClassParameter != null) {
try {

Back to the top