You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/06/14 11:28:39 UTC
[struts] 01/01: WW-5187 Comments out Velocity based PageFilter
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch WW-5187-velocity
in repository https://gitbox.apache.org/repos/asf/struts.git
commit fc2aebd10afcf6201572b209fe94a16fadbecac8
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Jun 14 13:17:19 2022 +0200
WW-5187 Comments out Velocity based PageFilter
---
.../main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java | 2 +-
plugins/sitemesh/src/main/resources/struts-plugin.xml | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java
index a57c8ed47..22de2c60a 100644
--- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java
+++ b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java
@@ -50,7 +50,7 @@ public class VelocityPageFilter extends SiteMeshFilter {
// TODO: Remove heavy coupling on horrible SM2 Factory
Factory factory = Factory.getInstance(new Config(filterConfig));
factory.refresh();
- return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper());
+ return new VelocityMapper2DecoratorSelector(factory.getDecoratorMapper());
}
}
diff --git a/plugins/sitemesh/src/main/resources/struts-plugin.xml b/plugins/sitemesh/src/main/resources/struts-plugin.xml
index c5fcd5d88..406a73a0f 100644
--- a/plugins/sitemesh/src/main/resources/struts-plugin.xml
+++ b/plugins/sitemesh/src/main/resources/struts-plugin.xml
@@ -22,8 +22,9 @@
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
-
+
<struts>
<bean class="org.apache.struts2.sitemesh.FreemarkerPageFilter" static="true" optional="true"/>
- <bean class="org.apache.struts2.sitemesh.VelocityPageFilter" static="true" optional="true"/>
+ <!-- if you want to use Velocity with Sitemesh, please define this bean in your struts.xml -->
+ <!-- bean class="org.apache.struts2.sitemesh.VelocityPageFilter" static="true" optional="true"/ -->
</struts>