From ea60965803088ec3f41dc4119cd010cebd26af40 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 28 Mar 2013 17:09:29 +1100 Subject: [PATCH] 404323 Improved parameterization of https and SPDY --- jetty-distribution/src/main/resources/start.ini | 7 +++---- .../org/eclipse/jetty/xml/XmlConfiguration.java | 15 +++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/jetty-distribution/src/main/resources/start.ini b/jetty-distribution/src/main/resources/start.ini index d582ff0ba6a..382010d19b3 100644 --- a/jetty-distribution/src/main/resources/start.ini +++ b/jetty-distribution/src/main/resources/start.ini @@ -55,10 +55,6 @@ # jetty.home=. # jetty.logs=./logs # jetty.host=0.0.0.0 -# jetty.port=8080 -# jetty.tls.port=8443 -# jetty.jmxrmihost=localhost -# jetty.jmxrmiport=1099 #=========================================================== @@ -121,6 +117,8 @@ etc/jetty.xml # enable --exec or use --exec-print (see above) #----------------------------------------------------------- OPTIONS=jmx +# jetty.jmxrmihost=localhost +# jetty.jmxrmiport=1099 # -Dcom.sun.management.jmxremote etc/jetty-jmx.xml #=========================================================== @@ -144,6 +142,7 @@ OPTIONS=jsp #=========================================================== # HTTP Connector #----------------------------------------------------------- +# jetty.port=8080 etc/jetty-http.xml #=========================================================== diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java index 53c24582038..467f5d77bd8 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java @@ -1195,16 +1195,19 @@ public class XmlConfiguration } } - // For all arguments, load properties or parse XMLs + // For all arguments, load properties + for (int i = 0; i < args.length; i++) + { + if (args[i].toLowerCase(Locale.ENGLISH).endsWith(".properties")) + properties.load(Resource.newResource(args[i]).getInputStream()); + } + + // For all arguments, parse XMLs XmlConfiguration last = null; Object[] obj = new Object[args.length]; for (int i = 0; i < args.length; i++) { - if (args[i].toLowerCase(Locale.ENGLISH).endsWith(".properties")) - { - properties.load(Resource.newResource(args[i]).getInputStream()); - } - else + if (!args[i].toLowerCase(Locale.ENGLISH).endsWith(".properties")) { XmlConfiguration configuration = new XmlConfiguration(Resource.newResource(args[i]).getURL()); if (last != null)