diff --git a/pom.xml b/pom.xml
index c05150aa638035c2f2b6a77f241c6d61c37de932..20ffe4f8e3368857a38558e2dda30f1f0e13bc05 100644
--- a/pom.xml
+++ b/pom.xml
@@ -556,6 +556,8 @@
org.dbflute.tomcat
tomcat-boot
${tomcat.boot.version}
+
+ provided
diff --git a/src/main/assemblies/files/fess.in.sh b/src/main/assemblies/files/fess.in.sh
index 0749e82927f51b3eb0e949285487e84c9ba51d50..b4a8e66ecf5ef4e08c7e36be4e4b97c536fac45f 100755
--- a/src/main/assemblies/files/fess.in.sh
+++ b/src/main/assemblies/files/fess.in.sh
@@ -80,4 +80,5 @@ FESS_JAVA_OPTS="$FESS_JAVA_OPTS -Dfess.log.name=$APP_NAME"
FESS_JAVA_OPTS="$FESS_JAVA_OPTS -Dfess.log.path=$FESS_HOME/logs"
FESS_JAVA_OPTS="$FESS_JAVA_OPTS -Dfess.log.level=info"
FESS_JAVA_OPTS="$FESS_JAVA_OPTS -Dlasta.env=production"
+FESS_JAVA_OPTS="$FESS_JAVA_OPTS -Dtomcat.config.path=tomcat_config.properties"
diff --git a/src/main/assemblies/files/tomcat_config.properties b/src/main/assemblies/files/tomcat_config.properties
new file mode 100644
index 0000000000000000000000000000000000000000..6a89128b83f9452278009fdea6e86c8967af9b5a
--- /dev/null
+++ b/src/main/assemblies/files/tomcat_config.properties
@@ -0,0 +1,9 @@
+# ========================================================================================
+# Web
+# =====
+# ----------------------------------------------------------
+# Tomcat
+# ------
+tomcat.URIEncoding = UTF-8
+tomcat.useBodyEncodingForURI = true
+
diff --git a/src/main/assemblies/package.xml b/src/main/assemblies/package.xml
index 49896432cb70dfc9ccd2b63f1525d50c32c05f01..61252531c20b1b06ada3cd20bdbb87281193334d 100644
--- a/src/main/assemblies/package.xml
+++ b/src/main/assemblies/package.xml
@@ -51,6 +51,7 @@
${project.basedir}/src/main/assemblies/files
logging.properties
+ tomcat_config.properties
fess-${project.version}/lib/classes
diff --git a/src/main/java/org/codelibs/fess/FessBoot.java b/src/main/java/org/codelibs/fess/FessBoot.java
index 0b5e9e8028d7d1f78874a664db2bbd68db29cf98..f6dec9631715690ee18f0a9ab1f8ea62627d2a75 100644
--- a/src/main/java/org/codelibs/fess/FessBoot.java
+++ b/src/main/java/org/codelibs/fess/FessBoot.java
@@ -6,8 +6,6 @@ import org.dbflute.tomcat.TomcatBoot;
public class FessBoot extends TomcatBoot {
- private static final String FESS_ENV_PROPERTIES = "fess_env.properties";
-
private static final String LOGGING_PROPERTIES = "logging.properties";
private static final String FESS_CONTEXT_PATH = "fess.context.path";
@@ -22,6 +20,8 @@ public class FessBoot extends TomcatBoot {
private static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
+ private static final String TOMCAT_CONFIG_PATH = "tomcat.config.path";
+
public FessBoot(final int port, final String contextPath) {
super(port, contextPath);
}
@@ -60,16 +60,19 @@ public class FessBoot extends TomcatBoot {
System.setProperty(JAVA_IO_TMPDIR, value);
}
- new FessBoot(getPort(), getContextPath()) //
- .useTldDetect() // for JSP
- .configure(FESS_ENV_PROPERTIES) // e.g. URIEncoding
- .logging(LOGGING_PROPERTIES, op -> {
- op.ignoreNoFile();
- final String fessHomeDir = System.getProperty("fess.home");
- if (fessHomeDir != null) {
- op.replace("fess.home", fessHomeDir);
- }
- }) // uses jdk14logger
+ final String tomcatConfigPath = getTomcatConfigPath();
+ TomcatBoot tomcatBoot = new FessBoot(getPort(), getContextPath()) //
+ .useTldDetect(); // for JSP
+ if (tomcatConfigPath != null) {
+ tomcatBoot.configure(tomcatConfigPath); // e.g. URIEncoding
+ }
+ tomcatBoot.logging(LOGGING_PROPERTIES, op -> {
+ op.ignoreNoFile();
+ final String fessHomeDir = System.getProperty("fess.home");
+ if (fessHomeDir != null) {
+ op.replace("fess.home", fessHomeDir);
+ }
+ }) // uses jdk14logger
.asDevelopment(isNoneEnv()).bootAwait();
}
@@ -92,4 +95,8 @@ public class FessBoot extends TomcatBoot {
}
return "/fess";
}
+
+ protected static String getTomcatConfigPath() {
+ return System.getProperty(TOMCAT_CONFIG_PATH);
+ }
}
diff --git a/src/main/resources/fess_env.properties b/src/main/resources/fess_env.properties
index 7aa7f842553fb8c5b43d4d7feba8c3037fd68860..b75916a75175d59466752858655e1ca2660119c4 100644
--- a/src/main/resources/fess_env.properties
+++ b/src/main/resources/fess_env.properties
@@ -45,8 +45,4 @@ mail.return.path = root@localhost
# ========================================================================================
# Web
# =====
-# ----------------------------------------------------------
-# Tomcat
-# ------
-tomcat.URIEncoding = UTF-8
-tomcat.useBodyEncodingForURI = true
+
diff --git a/src/main/resources/fess_env_production.properties b/src/main/resources/fess_env_production.properties
index 683bba2edf7a151a42ad0dc2a0e5e2071cee03ec..f0f16fd4528a56b6e4662726a492fad1df0edd67 100644
--- a/src/main/resources/fess_env_production.properties
+++ b/src/main/resources/fess_env_production.properties
@@ -44,8 +44,4 @@ mail.return.path = root@localhost
# ========================================================================================
# Web
# =====
-# ----------------------------------------------------------
-# Tomcat
-# ------
-tomcat.URIEncoding = UTF-8
-tomcat.useBodyEncodingForURI = true
+