You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by pa...@apache.org on 2018/10/11 04:44:48 UTC
[turbine-archetypes] branch master updated: Update to support
encoding valve, cleanup jetty.xml connection properties
This is an automated email from the ASF dual-hosted git repository.
painter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git
The following commit(s) were added to refs/heads/master by this push:
new 7f34530 Update to support encoding valve, cleanup jetty.xml connection properties
7f34530 is described below
commit 7f345308df8b776df4255c4c57c47caba6090d07
Author: jlpainter <je...@gmail.com>
AuthorDate: Thu Oct 11 00:44:16 2018 -0400
Update to support encoding valve, cleanup jetty.xml connection properties
---
src/main/resources/archetype-resources/pom.xml | 6 +++++-
.../src/main/webapp/WEB-INF/conf/TurbineResources.properties | 9 +++++++--
.../src/main/webapp/WEB-INF/conf/turbine-classic-pipeline.xml | 3 ++-
.../archetype-resources/src/main/webapp/WEB-INF/jetty-env.xml | 5 +++--
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index 4a7af88..41e5126 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -171,7 +171,11 @@ under the License.
<configuration>
<!-- Please update with your database configuration -->
<driver>${turbine_database_driver}</driver>
+
+ <!-- The serverTimezone parameter is required for MySQL.
+ You may need to remove it for other databases -->
<url>${turbine_database_url}${turbine_database_name}?serverTimezone=${turbine_database_timezone}</url>
+
<username>${turbine_database_user}</username>
<password>${turbine_database_password}</password>
<onError>continue</onError>
@@ -333,7 +337,7 @@ under the License.
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-cache</artifactId>
- <version>1.1.0</version>
+ <version>1.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
index ba14724..1120aa7 100644
--- a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
@@ -256,8 +256,13 @@ action.eventsubmit.needsvalue = false
# If the web container does not supply an explicit encoding for the
# request data, assume that is has this encoding. If you use e.g.
# UTF-8 or ISO-8859-<something>, change this parameter to keep your
-# special characters. Default is ISO-8859-1
-input.encoding=UTF-8
+# special characters. Default is ISO-8859-1.
+#
+# Check that the encoding valve is active in turbine-classic-pipeline.xml
+# if you are not seeing the expected behavior.
+#
+# input.encoding=UTF-8
+
# -------------------------------------------------------------------
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/turbine-classic-pipeline.xml b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/turbine-classic-pipeline.xml
index bd8f3fd..9effb98 100644
--- a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/turbine-classic-pipeline.xml
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/turbine-classic-pipeline.xml
@@ -19,7 +19,8 @@
-->
<pipeline>
<valves>
- <valve>org.apache.turbine.pipeline.DetermineActionValve</valve>
+ <valve>org.apache.turbine.pipeline.DefaultSetEncodingValve</valve>
+ <valve>org.apache.turbine.pipeline.DetermineActionValve</valve>
<valve>org.apache.turbine.pipeline.DetermineTargetValve</valve>
<valve>org.apache.turbine.pipeline.DefaultSessionTimeoutValve</valve>
<valve>org.apache.turbine.pipeline.DefaultLoginValve</valve>
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env.xml b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env.xml
index 6b19ed3..83a724f 100644
--- a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env.xml
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jetty-env.xml
@@ -5,10 +5,11 @@
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">${turbine_database_driver}</Set>
- <Set name="url">${turbine_database_url}${turbine_database_name}?serverTimezone=${turbine_database_timezone}</Set>
+ <Set name="url">${turbine_database_url}${turbine_database_name}</Set>
<Set name="username">${turbine_database_user}</Set>
<Set name="password">${turbine_database_password}</Set>
- <Set name="validationQuery">SELECT 1</Set>
+ <Set name="connectionProperties">serverTimezone=${turbine_database_timezone};useUnicode=true;characterEncoding=utf8;</Set>
+ <Set name="validationQuery">SELECT 1</Set>
</New>
</Arg>
</New>