From b976ac3aa3b22269fbe4b97787de8e9577c2cc6a Mon Sep 17 00:00:00 2001 From: Mark Kusch Date: Tue, 1 Nov 2016 16:57:24 +0100 Subject: [PATCH] With systemd on tomcat >= 8.5 we add custom protocol handlers based on the default when running tomcat with catalina.sh Signed-off-by: Mark Kusch --- templates/service_systemd.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/service_systemd.j2 b/templates/service_systemd.j2 index 35665a6..3433620 100644 --- a/templates/service_systemd.j2 +++ b/templates/service_systemd.j2 @@ -43,6 +43,9 @@ ExecStart={{ ansible_local.java.general.java_home }}/bin/java \ {% endif %} {% if item.prefer_ipv4|default(tomcat_default_prefer_ipv4) %} -Djava.net.preferIPv4Stack=true \ +{% endif %} +{% if tomcat_version|version_compare('8.5', '>=') %} + -Djava.protocol.handler.pkgs=org.apache.catalina.webresources \ {% endif %} -classpath "{{ tomcat_env_catalina_home }}/bin/bootstrap.jar:{{ tomcat_env_catalina_home }}/bin/tomcat-juli.jar" \ org.apache.catalina.startup.Bootstrap start @@ -71,6 +74,9 @@ ExecStop={{ ansible_local.java.general.java_home }}/bin/java \ {% endif %} {% if item.prefer_ipv4|default(tomcat_default_prefer_ipv4) %} -Djava.net.preferIPv4Stack=true \ +{% endif %} +{% if tomcat_version|version_compare('8.5', '>=') %} + -Djava.protocol.handler.pkgs=org.apache.catalina.webresources \ {% endif %} -classpath "{{ tomcat_env_catalina_home }}/bin/bootstrap.jar:{{ tomcat_env_catalina_home }}/bin/tomcat-juli.jar" \ org.apache.catalina.startup.Bootstrap stop