Skip to content

Commit 9f02d3a

Browse files
authored
Merge pull request #4899 from evolvedbinary/hotfix/eb-1977-system-config-empty-jetty
[fix] jetty configuration changes don't stick, and eventually crash eXist-db
2 parents 9d9d02c + eb838b6 commit 9f02d3a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

exist-core/src/main/java/org/exist/launcher/ConfigurationDialog.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ public ConfigurationDialog(Consumer<Boolean> callback) {
9797
if (ports.containsKey("jetty.port")) {
9898
httpPort.setValue(ports.get("jetty.port"));
9999
}
100+
if (ports.containsKey("jetty.http.port")) {
101+
httpPort.setValue(ports.get("jetty.http.port"));
102+
}
103+
if (ports.containsKey("ssl.port")) {
104+
sslPort.setValue(ports.get("ssl.port"));
105+
}
100106
if (ports.containsKey("jetty.ssl.port")) {
101107
sslPort.setValue(ports.get("jetty.ssl.port"));
102108
}

exist-core/src/main/java/org/exist/launcher/ConfigurationUtility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private static void getJettyPorts(Map<String, Integer> ports, Path jettyConfig)
9393
final int status = reader.next();
9494
if (status == XMLStreamReader.START_ELEMENT && "SystemProperty".equals(reader.getLocalName())) {
9595
final String name = reader.getAttributeValue(null, "name");
96-
if (name != null && (name.equals("jetty.port") || name.equals("jetty.ssl.port"))) {
96+
if (name != null && (name.equals("jetty.http.port") || name.equals("jetty.ssl.port"))) {
9797
final String defaultValue = reader.getAttributeValue(null, "default");
9898
if (defaultValue != null) {
9999
try {

exist-core/src/main/resources/org/exist/launcher/jetty.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
-->
2424
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2525

26-
<xsl:output indent="no" doctype-public="-//Jetty//Configure//EN" doctype-system="http://www.eclipse.org/jetty/configure.dtd"/>
26+
<xsl:output indent="no" doctype-public="-//Jetty//Configure//EN" doctype-system="http://www.eclipse.org/jetty/configure_10_0.dtd"/>
2727

2828
<xsl:preserve-space elements="*"/>
2929
<xsl:strip-space elements="Set"/>
3030

3131
<xsl:param name="port">8080</xsl:param>
3232
<xsl:param name="port.ssl">8443</xsl:param>
3333

34-
<xsl:template match="SystemProperty[@name='jetty.port']"><SystemProperty name="jetty.port" default="{$port}"/></xsl:template>
34+
<xsl:template match="SystemProperty[@name='jetty.http.port']"><SystemProperty name="jetty.http.port" default="{$port}"/></xsl:template>
3535

3636
<xsl:template match="SystemProperty[@name='jetty.ssl.port']"><SystemProperty name="jetty.ssl.port" default="{$port.ssl}"/></xsl:template>
3737

0 commit comments

Comments
 (0)