X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=server%2Fruntime%2Forg.argeo.server.catalina.start%2Fsrc%2Fmain%2Fjava%2Forg%2Fspringframework%2Fosgi%2Fweb%2Ftomcat%2Finternal%2FActivator.java;h=17ed5e996e1bafe308c3548f8f5ecaed8ec6711d;hb=4646d292392fec25320bd23df142513766e4c53d;hp=9481f3158282293b52325071f5b96813aaa06aaf;hpb=6d06f51b7468bf8fcfd63447bfcf77b9d4268fa9;p=lgpl%2Fargeo-commons.git diff --git a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java b/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java index 9481f3158..17ed5e996 100644 --- a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java +++ b/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java @@ -20,6 +20,7 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; @@ -155,12 +156,20 @@ public class Activator implements BundleActivator { throws Exception { URL xmlConfiguration = null; - if (System.getProperty(CatalinaActivator.ARGEO_SERVER_TOMCAT_CONFIG) != null) - xmlConfiguration = new URL( - System.getProperty(CatalinaActivator.ARGEO_SERVER_TOMCAT_CONFIG)); - else + if (System.getProperty(CatalinaActivator.ARGEO_SERVER_TOMCAT_CONFIG) != null) { + String customConfig = System + .getProperty(CatalinaActivator.ARGEO_SERVER_TOMCAT_CONFIG); + try { + xmlConfiguration = new URL(customConfig); + } catch (MalformedURLException e) { + // within this bundle + // typically 'default-server-ssl.xml' + xmlConfiguration = bundle.getResource(customConfig); + } + } else { // fragment xmlConfiguration = bundle.getResource(XML_CONF_LOCATION); + } if (xmlConfiguration != null) { log.info("Using custom XML configuration " + xmlConfiguration);