Skip to content

Commit

Permalink
Merge pull request #4899 from evolvedbinary/hotfix/eb-1977-system-con…
Browse files Browse the repository at this point in the history
…fig-empty-jetty

[fix] jetty configuration changes don't stick, and eventually crash eXist-db
  • Loading branch information
reinhapa committed May 3, 2023
2 parents 9d9d02c + eb838b6 commit 9f02d3a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ public ConfigurationDialog(Consumer<Boolean> callback) {
if (ports.containsKey("jetty.port")) {
httpPort.setValue(ports.get("jetty.port"));
}
if (ports.containsKey("jetty.http.port")) {
httpPort.setValue(ports.get("jetty.http.port"));
}
if (ports.containsKey("ssl.port")) {
sslPort.setValue(ports.get("ssl.port"));
}
if (ports.containsKey("jetty.ssl.port")) {
sslPort.setValue(ports.get("jetty.ssl.port"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private static void getJettyPorts(Map<String, Integer> ports, Path jettyConfig)
final int status = reader.next();
if (status == XMLStreamReader.START_ELEMENT && "SystemProperty".equals(reader.getLocalName())) {
final String name = reader.getAttributeValue(null, "name");
if (name != null && (name.equals("jetty.port") || name.equals("jetty.ssl.port"))) {
if (name != null && (name.equals("jetty.http.port") || name.equals("jetty.ssl.port"))) {
final String defaultValue = reader.getAttributeValue(null, "default");
if (defaultValue != null) {
try {
Expand Down
4 changes: 2 additions & 2 deletions exist-core/src/main/resources/org/exist/launcher/jetty.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

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

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

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

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

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

Expand Down

0 comments on commit 9f02d3a

Please sign in to comment.