Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2013-05-08 12:40:41 +0000
committerThomas Watson2013-05-08 12:40:41 +0000
commit868dd9894a2b879f689170bf9144b725a2daedd1 (patch)
tree53cf998058a9b5f3bbe7831a0bfc798a076e8736
parent11509f35cc6d7904ada531638fc6e6db02ae62a5 (diff)
downloadrt.equinox.bundles-868dd9894a2b879f689170bf9144b725a2daedd1.tar.gz
rt.equinox.bundles-868dd9894a2b879f689170bf9144b725a2daedd1.tar.xz
rt.equinox.bundles-868dd9894a2b879f689170bf9144b725a2daedd1.zip
Bug 407459 - Servletbridge should support initialization/preload of
classes using Webapps Class loader before launching
-rw-r--r--bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java9
1 files changed, 5 insertions, 4 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 2827b31db..e857015f8 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, 2009 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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.util.StringTokenizer;
import javax.servlet.ServletException;
import javax.servlet.http.*;
@@ -48,9 +49,9 @@ public class BridgeServlet extends HttpServlet {
// Use with caution!! Some classes MUST be initialized with the web-app class loader
String frameworkPreloads = getServletConfig().getInitParameter("_contextPreloads"); //$NON-NLS-1$
if (frameworkPreloads != null) {
- String[] classes = frameworkPreloads.split(","); //$NON-NLS-1$
- for (int i = 0; i < classes.length; i++) {
- String clazz = classes[i].trim();
+ StringTokenizer st = new StringTokenizer(frameworkPreloads);
+ while (st.hasMoreElements()) {
+ String clazz = st.nextToken().trim();
if (clazz.length() != 0) {
try {
this.getClass().getClassLoader().loadClass(clazz);

Back to the top