Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2009-05-20 16:10:51 +0000
committerSimon Kaegi2009-05-20 16:10:51 +0000
commit9c7d1af3c89845cb001b304574fe565858d014f6 (patch)
tree94a0bc7a4262b7eb22f93c650b153fbcf4ba5984
parent05f18a194dab5e94467c511ea7a3bdd408609074 (diff)
downloadrt.equinox.bundles-9c7d1af3c89845cb001b304574fe565858d014f6.tar.gz
rt.equinox.bundles-9c7d1af3c89845cb001b304574fe565858d014f6.tar.xz
rt.equinox.bundles-9c7d1af3c89845cb001b304574fe565858d014f6.zip
Bug 277005 http.port property not set with Jetty6 Http Servicev20090520
-rw-r--r--bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java b/bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
index a1fa6aed0..8f3c2299b 100644
--- a/bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
+++ b/bundles/org.eclipse.equinox.http.jetty6/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java
@@ -82,11 +82,18 @@ public class HttpServerManager implements ManagedServiceFactory {
holder.setInitOrder(0);
holder.setInitParameter(Constants.SERVICE_VENDOR, "Eclipse.org"); //$NON-NLS-1$
holder.setInitParameter(Constants.SERVICE_DESCRIPTION, "Equinox Jetty-based Http Service"); //$NON-NLS-1$
- if (httpConnector != null)
- holder.setInitParameter(JettyConstants.HTTP_PORT, new Integer(httpConnector.getLocalPort()).toString());
- if (httpsConnector != null)
- holder.setInitParameter(JettyConstants.HTTPS_PORT, new Integer(httpsConnector.getLocalPort()).toString());
-
+ if (httpConnector != null) {
+ int port = httpConnector.getLocalPort();
+ if (port == -1)
+ port = httpConnector.getPort();
+ holder.setInitParameter(JettyConstants.HTTP_PORT, Integer.toString(port));
+ }
+ if (httpsConnector != null) {
+ int port = httpsConnector.getLocalPort();
+ if (port == -1)
+ port = httpsConnector.getPort();
+ holder.setInitParameter(JettyConstants.HTTPS_PORT, Integer.toString(port));
+ }
String otherInfo = (String) dictionary.get(JettyConstants.OTHER_INFO);
if (otherInfo != null)
holder.setInitParameter(JettyConstants.OTHER_INFO, otherInfo);

Back to the top