[struts] 06/14: WW-5049 Includes the new plugin in assembly

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 934b5d14106865058f631fc8f20643d5e74a94c8
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 20:27:44 2019 +0100

WW-5049 Includes the new plugin in assembly
---
 assembly/src/main/assembly/all.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/assembly/src/main/assembly/all.xml 
b/assembly/src/main/assembly/all.xml
index 36ca3f5..0c08b48 100644
--- a/assembly/src/main/assembly/all.xml
+++ b/assembly/src/main/assembly/all.xml
@@ -209,6 +209,10 @@
 ../plugins/tiles/target/apidocs
 
docs/struts2-plugins/struts2-tiles-plugin/apidocs
   
+  
+../plugins/velocity/target/apidocs
+
docs/struts2-plugins/struts2-velocity-plugin/apidocs
+  
 
 
 



[struts] 03/14: Reorder modules to build apps at the end

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit ea8e2b5a9652caa9a6fc7c970b236abab604218e
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 20:26:54 2019 +0100

Reorder modules to build apps at the end
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c8c6387..8b42a17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,9 +75,9 @@
 
 bom
 core
-apps
 plugins
 bundles
+apps
 
 
 



[struts] 05/14: WW-5049 Extends xwork DTD as well

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit df4e193aa87bdaa0637d26f9c39184fa550bc52e
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 20:27:28 2019 +0100

WW-5049 Extends xwork DTD as well
---
 .../config/providers/XmlConfigurationProvider.java |   3 +-
 .../config/StrutsXmlConfigurationProvider.java |   1 +
 core/src/main/resources/xwork-2.6.dtd  | 157 +
 3 files changed, 160 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index dd61d81..745f908 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -116,6 +116,7 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 this.errorIfMissing = errorIfMissing;
 
 Map mappings = new HashMap<>();
+mappings.put("-//Apache Struts//XWork 2.6//EN", "xwork-2.6.dtd");
 mappings.put("-//Apache Struts//XWork 2.5//EN", "xwork-2.5.dtd");
 mappings.put("-//Apache Struts//XWork 2.3//EN", "xwork-2.3.dtd");
 mappings.put("-//Apache Struts//XWork 2.1.3//EN", "xwork-2.1.3.dtd");
@@ -224,7 +225,7 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 String impl = child.getAttribute("class");
 try {
 Class classImpl = ClassLoaderUtil.loadClass(impl, 
getClass());
-if 
(classImpl.isAssignableFrom(ConfigurationProvider.class)) {
+if 
(ConfigurationProvider.class.isAssignableFrom(classImpl)) {
 ConfigurationProvider provider = 
(ConfigurationProvider) classImpl.newInstance();
 provider.register(containerBuilder, props);
 } else {
diff --git 
a/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
 
b/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
index ef27b6c..5f4bf9e 100644
--- 
a/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
+++ 
b/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
@@ -73,6 +73,7 @@ public class StrutsXmlConfigurationProvider extends 
XmlConfigurationProvider {
 dtdMappings.put("-//Apache Software Foundation//DTD Struts 
Configuration 2.1.7//EN", "struts-2.1.7.dtd");
 dtdMappings.put("-//Apache Software Foundation//DTD Struts 
Configuration 2.3//EN", "struts-2.3.dtd");
 dtdMappings.put("-//Apache Software Foundation//DTD Struts 
Configuration 2.5//EN", "struts-2.5.dtd");
+dtdMappings.put("-//Apache Software Foundation//DTD Struts 
Configuration 2.6//EN", "struts-2.6.dtd");
 setDtdMappings(dtdMappings);
 File file = new File(filename);
 if (file.getParent() != null) {
diff --git a/core/src/main/resources/xwork-2.6.dtd 
b/core/src/main/resources/xwork-2.6.dtd
new file mode 100644
index 000..6f0e319
--- /dev/null
+++ b/core/src/main/resources/xwork-2.6.dtd
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



[struts] 04/14: WW-5049 Drops name as not needed

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit d0039d191bb92e12ec12c12bccd713fb263f93c9
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 20:27:10 2019 +0100

WW-5049 Drops name as not needed
---
 plugins/velocity/src/main/resources/struts-plugin.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/velocity/src/main/resources/struts-plugin.xml 
b/plugins/velocity/src/main/resources/struts-plugin.xml
index 04842de..435fab9 100644
--- a/plugins/velocity/src/main/resources/struts-plugin.xml
+++ b/plugins/velocity/src/main/resources/struts-plugin.xml
@@ -27,7 +27,7 @@
 
 
 
-
+
 
 



[struts] 14/14: WW-5049 Reverts to static final as this will be refactored anyway

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit a456b1fdd569a65307de6add29fe20700f496fd8
Author: Lukasz Lenart 
AuthorDate: Thu Dec 26 09:39:47 2019 +0100

WW-5049 Reverts to static final as this will be refactored anyway
---
 .../main/java/org/apache/struts2/views/velocity/VelocityManager.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
 
b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
index b653380..6cbbaed 100644
--- 
a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
+++ 
b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
@@ -524,7 +524,7 @@ public class VelocityManager {
 sb.append(clazz.getName()).append(",");
 }
 
-private String replace(String string, String oldString, String newString) {
+private static final String replace(String string, String oldString, 
String newString) {
 if (string == null) {
 return null;
 }



[struts] 10/14: WW-5049 Drops unused files

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 0009bdeb31c9864267b1c5a8583bf975e42e16c9
Author: Lukasz Lenart 
AuthorDate: Wed Nov 27 19:58:59 2019 +0100

WW-5049 Drops unused files
---
 .../resources/template/velocity/ajax/a-close.vm|  21 
 .../src/main/resources/template/velocity/ajax/a.vm |  33 ---
 .../resources/template/velocity/ajax/div-close.vm  |  21 
 .../main/resources/template/velocity/ajax/div.vm   |  35 ---
 .../resources/template/velocity/ajax/form-close.vm |  22 -
 .../main/resources/template/velocity/ajax/form.vm  |  39 
 .../resources/template/velocity/ajax/submit.vm |  33 ---
 .../resources/template/velocity/ajax/tab-close.vm  |  27 --
 .../main/resources/template/velocity/ajax/tab.vm   |  37 ---
 .../resources/template/velocity/simple/checkbox.vm |  30 --
 .../template/velocity/simple/checkboxlist.vm   |  45 -
 .../resources/template/velocity/simple/combobox.vm |  43 
 .../resources/template/velocity/simple/debug.vm|  85 
 .../template/velocity/simple/doubleselect.vm   | 108 -
 .../resources/template/velocity/simple/empty.vm|  20 
 .../resources/template/velocity/simple/file.vm |  32 --
 .../template/velocity/simple/form-close.vm |  21 
 .../resources/template/velocity/simple/form.vm |  32 --
 .../resources/template/velocity/simple/hidden.vm   |  28 --
 .../resources/template/velocity/simple/label.vm|  26 -
 .../resources/template/velocity/simple/password.vm |  34 ---
 .../resources/template/velocity/simple/radiomap.vm |  55 ---
 .../template/velocity/simple/scripting-events.vm   |  34 ---
 .../resources/template/velocity/simple/select.vm   |  63 
 .../resources/template/velocity/simple/submit.vm   |  27 --
 .../resources/template/velocity/simple/table.vm| 101 ---
 .../resources/template/velocity/simple/text.vm |  34 ---
 .../resources/template/velocity/simple/textarea.vm |  33 ---
 .../resources/template/velocity/simple/token.vm|  22 -
 .../resources/template/velocity/xhtml/checkbox.vm  |  39 
 .../template/velocity/xhtml/checkboxlist.vm|  23 -
 .../resources/template/velocity/xhtml/combobox.vm  |  21 
 .../template/velocity/xhtml/controlfooter.vm   |  22 -
 .../template/velocity/xhtml/controlheader.vm   |  47 -
 .../resources/template/velocity/xhtml/debug.vm |  21 
 .../template/velocity/xhtml/doubleselect.vm|  21 
 .../resources/template/velocity/xhtml/empty.vm |  20 
 .../main/resources/template/velocity/xhtml/file.vm |  21 
 .../template/velocity/xhtml/form-close.vm  |  22 -
 .../main/resources/template/velocity/xhtml/form.vm |  28 --
 .../resources/template/velocity/xhtml/hidden.vm|  21 
 .../resources/template/velocity/xhtml/label.vm |  21 
 .../resources/template/velocity/xhtml/password.vm  |  21 
 .../resources/template/velocity/xhtml/radiomap.vm  |  21 
 .../resources/template/velocity/xhtml/select.vm|  21 
 .../resources/template/velocity/xhtml/submit.vm|  23 -
 .../resources/template/velocity/xhtml/table.vm |  21 
 .../main/resources/template/velocity/xhtml/text.vm |  21 
 .../resources/template/velocity/xhtml/textarea.vm  |  22 -
 .../resources/template/velocity/xhtml/token.vm |  21 
 50 files changed, 1639 deletions(-)

diff --git 
a/plugins/velocity/src/main/resources/template/velocity/ajax/a-close.vm 
b/plugins/velocity/src/main/resources/template/velocity/ajax/a-close.vm
deleted file mode 100644
index f8c9229..000
--- a/plugins/velocity/src/main/resources/template/velocity/ajax/a-close.vm
+++ /dev/null
@@ -1,21 +0,0 @@
-#*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *#
-
diff --git a/plugins/velocity/src/main/resources/template/velocity/ajax/a.vm 
b/plugins/velocity/src/main/resources/template/velocity/ajax/a.vm
deleted file mode 100644
index 83c3501..

[struts] 08/14: WW-5049 Adds missing internal dependency

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 868ec779bf47ee0a0a4844c69a861056a944bc49
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 20:52:02 2019 +0100

WW-5049 Adds missing internal dependency
---
 plugins/config-browser/pom.xml |  7 +++
 .../org/apache/struts2/config_browser/ShowBeansAction.java |  3 ++-
 plugins/osgi/pom.xml   | 10 ++
 plugins/velocity/pom.xml   |  6 --
 4 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/plugins/config-browser/pom.xml b/plugins/config-browser/pom.xml
index d494d4b..1286000 100644
--- a/plugins/config-browser/pom.xml
+++ b/plugins/config-browser/pom.xml
@@ -34,4 +34,11 @@
 
UTF-8
 
+
+
+
+org.apache.struts
+struts2-velocity-plugin
+
+
 
diff --git 
a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
 
b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
index c1eec8a..8827fd8 100644
--- 
a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
+++ 
b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
@@ -30,6 +30,7 @@ import org.apache.struts2.components.UrlRenderer;
 import org.apache.struts2.dispatcher.mapper.ActionMapper;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
 import org.apache.struts2.views.freemarker.FreemarkerManager;
+import org.apache.struts2.views.velocity.VelocityConstants;
 import org.apache.struts2.views.velocity.VelocityManager;
 
 import java.util.Map;
@@ -57,7 +58,7 @@ public class ShowBeansAction extends ActionNamesAction {
 bindings.put(ActionMapper.class.getName(), addBindings(container, 
ActionMapper.class, StrutsConstants.STRUTS_MAPPER_CLASS));
 bindings.put(MultiPartRequest.class.getName(), addBindings(container, 
MultiPartRequest.class, StrutsConstants.STRUTS_MULTIPART_PARSER));
 bindings.put(FreemarkerManager.class.getName(), addBindings(container, 
FreemarkerManager.class, StrutsConstants.STRUTS_FREEMARKER_MANAGER_CLASSNAME));
-bindings.put(VelocityManager.class.getName(), addBindings(container, 
VelocityManager.class, StrutsConstants.STRUTS_VELOCITY_MANAGER_CLASSNAME));
+bindings.put(VelocityManager.class.getName(), addBindings(container, 
VelocityManager.class, VelocityConstants.STRUTS_VELOCITY_MANAGER_CLASSNAME));
 bindings.put(UrlRenderer.class.getName(), addBindings(container, 
UrlRenderer.class, StrutsConstants.STRUTS_URL_RENDERER));
 }
 
diff --git a/plugins/osgi/pom.xml b/plugins/osgi/pom.xml
index 9162538..d78412c 100644
--- a/plugins/osgi/pom.xml
+++ b/plugins/osgi/pom.xml
@@ -63,14 +63,8 @@
 
 
 
-org.apache.velocity
-velocity
-
-
-
-org.apache.velocity
-velocity-tools
-true
+org.apache.struts
+struts2-velocity-plugin
 
 
 
diff --git a/plugins/velocity/pom.xml b/plugins/velocity/pom.xml
index de58b17..649e1d4 100644
--- a/plugins/velocity/pom.xml
+++ b/plugins/velocity/pom.xml
@@ -35,12 +35,6 @@
 
 
 
-org.apache.struts
-struts2-core
-
-
-
-
 org.apache.velocity
 velocity
 



[struts] 11/14: WW-5049 Supports bean-selection via Java config

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 9c1b0cf1c25d057899e28a5323fbed8ebf45a44e
Author: Lukasz Lenart 
AuthorDate: Wed Nov 27 23:56:49 2019 +0100

WW-5049 Supports bean-selection via Java config
---
 .../config/providers/XmlConfigurationProvider.java |  2 +-
 .../struts2/config/StrutsJavaConfiguration.java|  4 +++
 .../config/StrutsJavaConfigurationProvider.java| 35 +-
 .../BeanSelectionConfig.java}  | 29 +-
 core/src/main/resources/struts-2.6.dtd |  6 ++--
 core/src/main/resources/xwork-2.6.dtd  |  6 ++--
 .../xwork2/util/location/LocationUtilsTest.java|  6 
 .../StrutsJavaConfigurationProviderTest.java   | 28 ++---
 .../struts2/config/TestBeanSelectionProvider.java} | 17 ++-
 .../velocity/src/main/resources/struts-plugin.xml  |  2 +-
 10 files changed, 100 insertions(+), 35 deletions(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index a314149..04aad76 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -221,7 +221,7 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 
 final String nodeName = child.getNodeName();
 
-if ("bean-provider".equals(nodeName)) {
+if ("bean-selection".equals(nodeName)) {
 String name = child.getAttribute("name");
 String impl = child.getAttribute("class");
 try {
diff --git 
a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java 
b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java
index da84d5e..1129304 100644
--- a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java
+++ b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfiguration.java
@@ -19,8 +19,10 @@
 package org.apache.struts2.config;
 
 import java.util.List;
+import java.util.Optional;
 
 import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.BeanSelectionConfig;
 import org.apache.struts2.config.entities.ConstantConfig;
 
 public interface StrutsJavaConfiguration {
@@ -28,5 +30,7 @@ public interface StrutsJavaConfiguration {
 
 List constants();
 
+default Optional beanSelection() { return 
Optional.empty();}
+
 List unknownHandlerStack();
 }
diff --git 
a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java
 
b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java
index 5aaaf57..7538ea3 100644
--- 
a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java
+++ 
b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java
@@ -24,9 +24,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import com.opensymphony.xwork2.config.BeanSelectionProvider;
+import com.opensymphony.xwork2.util.ClassLoaderUtil;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.struts2.config.entities.BeanConfig;
+import org.apache.struts2.config.entities.BeanSelectionConfig;
 import org.apache.struts2.config.entities.ConstantConfig;
 
 import com.opensymphony.xwork2.config.Configuration;
@@ -91,6 +94,20 @@ public class StrutsJavaConfigurationProvider implements 
ConfigurationProvider {
 }
 }
 
+// bean-selection
+javaConfig.beanSelection().ifPresent(beanSelectionConfig -> {
+try {
+LOG.debug("Registering bean selection provider {} of type {}",
+beanSelectionConfig.getName(), 
beanSelectionConfig.getClazz().getName());
+
+BeanSelectionProvider provider = 
beanSelectionConfig.getClazz().newInstance();
+provider.register(builder, props);
+} catch (IllegalAccessException | InstantiationException e) {
+throw new ConfigurationException("Unable to load : name:" + 
beanSelectionConfig.getName()
++ " class:" + beanSelectionConfig.getClazz().getName());
+}
+});
+
 // unknown-handler-stack
 List unknownHandlers = javaConfig.unknownHandlerStack();
 if (unknownHandlers != null) {
@@ -125,10 +142,10 @@ public class StrutsJavaConfigurationProvider implements 
ConfigurationProvider {
 } else {
 if (containerBuilder.contains(beanConf.getType(), 
beanConf.getName())) {
 

[struts] 12/14: WW-5047 Avoids confusion about scope's default value

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 503c8b7623767a5cbb97b361a34ca619114ef7b1
Author: Lukasz Lenart 
AuthorDate: Thu Dec 26 09:34:41 2019 +0100

WW-5047 Avoids confusion about scope's default value
---
 .../xwork2/config/providers/XmlConfigurationProvider.java   | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index 04aad76..ce1587d 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -242,15 +242,19 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 String onlyStatic = child.getAttribute("static");
 String scopeStr = child.getAttribute("scope");
 boolean optional = 
"true".equals(child.getAttribute("optional"));
-Scope scope = Scope.SINGLETON;
+Scope scope;
 if ("prototype".equals(scopeStr)) {
 scope = Scope.PROTOTYPE;
 } else if ("request".equals(scopeStr)) {
 scope = Scope.REQUEST;
 } else if ("session".equals(scopeStr)) {
 scope = Scope.SESSION;
+} else if ("singleton".equals(scopeStr)) {
+scope = Scope.SINGLETON;
 } else if ("thread".equals(scopeStr)) {
 scope = Scope.THREAD;
+} else {
+scope = Scope.SINGLETON;
 }
 
 if (StringUtils.isEmpty(name)) {



[struts] branch WW-5049-velocity-plugin updated (11571f0 -> a456b1f)

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git.


omit 11571f0  WW-5049 Reverts to static final as this will be refactored 
anyway
omit 69c9a10  WW-5049 Drops empty space
omit dddb380  WW-5047 Avoids confusion about scope's default value
omit 93b6efe  WW-5049 Supports bean-selection via Java config
omit 5a27216  WW-5049 Drops unused files
omit 4033b68  WW-5049 Sets proper order of configuration elements
omit 383cc29  WW-5049 Adds missing internal dependency
omit edba1ac  WW-5049 Renames default bean provider
omit 03b3352  WW-5049 Includes the new plugin in assembly
omit 258153b  WW-5049 Extends xwork DTD as well
omit 13ee3d0  WW-5049 Drops name as not needed
omit b6c24de  Reorder modules to build apps at the end
omit 73ae360  WW-5049 Allows define a custom bean provider
omit da28c5a  WW-5049 Moves Velocity support into a dedicated plugin
 add 12ed52e  Remove unused xerces import
 add 0c17c65  Fix warning: Use parameterized types instead of raw types
 add 8485b26  Merge pull request #381 from 
sepe81/fix-XmlConfigurationProviderTest
 add 2211fab  Supresses false positives which will be removed once Velocity 
will be upgraded
 add b40ea9a  Update slf4j to 1.7.29
 add 377b0ca  Update jackson-databind to 2.10.1
 add db9f01a  Update asm to 7.2
 add 4cff397  Update maven-surefire-plugin to 2.22.2
 add 0f5fc65  Update commons-collections4 to 4.4
 add 156d9a1  Update commons-lang3 to 3.9
 add d705cca  Update commons-text to 1.8
 add 22d1afd  Merge pull request #382 from sepe81/update-dependencies
 add 6504e67  Adds a link to Struts Examples pages
 add 54d01ae  Merge pull request #385 from 
JCgH4164838Gh792C124B5/local_25x_TstFix1
 add dfbacfc  Merge pull request #386 from 
JCgH4164838Gh792C124B5/local_26x_TstFix1
 add 3082b94  Update maven-wrapper to 0.5.6 and maven to 3.6.3
 add fb4c716  Merge pull request #389 from sepe81/update-mvnw
 add ba7cd74  Update OWASP dependency-check-maven to 5.2.4
 add 7313d4e  Merge pull request #388 from sepe81/update-owasp
 add 03da857  Fixes Showcase app Tiles example
 add 11999d1  WW-5041 Upgrade to OGNL 3.1.26 and adapt to its new features
 add 84cf17e  Minor follow-up changes to PR #371 - added some additional 
exclusions in struts-default.xml. - added log warning that specifies the value 
of maxLength involved if   applyExpressionMaxLength(maxLength) fails. - added 
null guards to two handleOgnlException() methods that could   result in an NPE 
with #371 changes (a null OgnlException parameter   was permissible previously, 
correct or not).
 add a23db41  Additional change - added unit test (hoping to make coveralls 
happy).
 add 28a7912  Disable expressionMaxLength by default for Struts 2.5.x. 
(#380)
 add 7dddaf5  refactor duplicate code. add log info.
 add 93f9cf6  increase security log levels to error
 add 5e40998  Merge pull request #390 from yasserzamani/ognl3_2_12
 add 2fc4b6c  Syncs maven-site-plugin version with the latest fluido-skin 
version
 add 6cec3f4  Avoids failing site generation because of the outdated 
dependencies
 add 140bea2  WW-5003 Drops XWorkException and uses StrutsException instead
 add 8952cff  Merge pull request #391 from 
apache/WW-5003-drops-xwork-exception
 new 5c55e69  WW-5049 Moves Velocity support into a dedicated plugin
 new a7cfed7  WW-5049 Allows define a custom bean provider
 new ea8e2b5  Reorder modules to build apps at the end
 new d0039d1  WW-5049 Drops name as not needed
 new df4e193  WW-5049 Extends xwork DTD as well
 new 934b5d1  WW-5049 Includes the new plugin in assembly
 new 84f8438  WW-5049 Renames default bean provider
 new 868ec77  WW-5049 Adds missing internal dependency
 new 7c6dfe1  WW-5049 Sets proper order of configuration elements
 new 0009bde  WW-5049 Drops unused files
 new 9c1b0cf  WW-5049 Supports bean-selection via Java config
 new 503c8b7  WW-5047 Avoids confusion about scope's default value
 new 8d8b306  WW-5049 Drops empty space
 new a456b1f  WW-5049 Reverts to static final as this will be refactored 
anyway

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (11571f0)
\
 N -- N -- N   refs/heads/WW-5049-velocity-plugin (a456b1f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references stil

[struts] 01/14: WW-5049 Moves Velocity support into a dedicated plugin

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 5c55e69b4fb8effd6456e222ff4d080c13cd41f1
Author: Lukasz Lenart 
AuthorDate: Mon Nov 25 09:33:05 2019 +0100

WW-5049 Moves Velocity support into a dedicated plugin
---
 apps/showcase/pom.xml  |  5 ++
 .../showcase/src/main/resources/struts-tags-ui.xml |  2 +-
 .../java/org/apache/struts2/StrutsConstants.java   |  3 -
 .../config/DefaultBeanSelectionProvider.java   |  4 -
 .../struts2/config/entities/ConstantConfig.java|  1 -
 .../apache/struts2/views/DefaultTagLibrary.java| 90 +-
 .../struts2/views/TagLibraryDirectiveProvider.java |  2 +-
 core/src/main/resources/struts-default.xml |  4 -
 .../struts2/views/TemplateEngineManagerTest.java   | 12 +--
 plugins/pom.xml|  3 +-
 plugins/portlet/pom.xml|  5 ++
 plugins/sitemesh/pom.xml   | 11 +--
 plugins/{sitemesh => velocity}/pom.xml | 41 --
 .../views/velocity/StrutsResourceLoader.java   |  0
 .../views/velocity/StrutsVelocityContext.java  | 13 ++--
 .../velocity/VelocityBeanSelectionProvider.java| 54 +
 .../struts2/views/velocity/VelocityConstants.java  | 11 ++-
 .../struts2/views/velocity/VelocityManager.java| 54 +
 .../struts2/views/velocity/VelocityTagLibrary.java | 33 +++-
 .../velocity/components/AbstractDirective.java |  0
 .../views/velocity/components/ActionDirective.java |  0
 .../velocity/components/ActionErrorDirective.java  |  0
 .../components/ActionMessageDirective.java |  0
 .../views/velocity/components/AnchorDirective.java |  0
 .../views/velocity/components/BeanDirective.java   |  0
 .../velocity/components/CheckBoxDirective.java |  0
 .../velocity/components/CheckBoxListDirective.java |  0
 .../velocity/components/ComboBoxDirective.java |  0
 .../velocity/components/ComponentDirective.java|  0
 .../views/velocity/components/DateDirective.java   |  0
 .../velocity/components/DoubleSelectDirective.java |  0
 .../velocity/components/FieldErrorDirective.java   |  0
 .../views/velocity/components/FileDirective.java   |  0
 .../views/velocity/components/FormDirective.java   |  0
 .../views/velocity/components/HeadDirective.java   |  0
 .../views/velocity/components/HiddenDirective.java |  0
 .../views/velocity/components/I18nDirective.java   |  0
 .../velocity/components/IncludeDirective.java  |  0
 .../components/InputTransferSelectDirective.java   |  0
 .../views/velocity/components/LabelDirective.java  |  0
 .../velocity/components/OptGroupDirective.java |  0
 .../components/OptionTransferSelectDirective.java  |  0
 .../views/velocity/components/ParamDirective.java  |  0
 .../velocity/components/PasswordDirective.java |  0
 .../velocity/components/PropertyDirective.java |  0
 .../views/velocity/components/PushDirective.java   |  0
 .../views/velocity/components/RadioDirective.java  |  0
 .../views/velocity/components/ResetDirective.java  |  0
 .../views/velocity/components/SelectDirective.java |  0
 .../views/velocity/components/SetDirective.java|  0
 .../views/velocity/components/SubmitDirective.java |  0
 .../velocity/components/TextAreaDirective.java |  0
 .../views/velocity/components/TextDirective.java   |  0
 .../velocity/components/TextFieldDirective.java|  0
 .../views/velocity/components/TokenDirective.java  |  0
 .../views/velocity/components/URLDirective.java|  0
 .../velocity/components/UpDownSelectDirective.java |  0
 .../org/apache/struts2/views/velocity/package.html |  0
 .../views/velocity}/result/VelocityResult.java |  3 +-
 .../velocity}/template/VelocityTemplateEngine.java |  6 +-
 .../velocity/src/main/resources/struts-plugin.xml  | 41 ++
 .../resources/template/velocity}/ajax/a-close.vm   |  0
 .../main/resources/template/velocity}/ajax/a.vm|  0
 .../resources/template/velocity}/ajax/div-close.vm |  0
 .../main/resources/template/velocity}/ajax/div.vm  |  0
 .../template/velocity}/ajax/form-close.vm  |  0
 .../main/resources/template/velocity}/ajax/form.vm |  0
 .../resources/template/velocity}/ajax/submit.vm|  0
 .../resources/template/velocity}/ajax/tab-close.vm |  0
 .../main/resources/template/velocity}/ajax/tab.vm  |  0
 .../template/velocity}/simple/checkbox.vm  |  0
 .../template/velocity}/simple/checkboxlist.vm  |  0
 .../template/velocity}/simple/combobox.vm  |  0
 .../resources/template/velocity}/simple/debug.vm   |  0
 .../template/velocity}/simple/doubleselect.vm  |  0
 .../resources/template/velocity/simple}/empty.vm   |  0
 .../resources/template/velocity}/simple/file.vm|  0
 .../template/velocity}/simple/form-close.vm|  0
 .../resources/template/velocity}/simple/form.vm|

[struts] 13/14: WW-5049 Drops empty space

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 8d8b306c3c16cb2d345d152121fcaf67b5fad346
Author: Lukasz Lenart 
AuthorDate: Thu Dec 26 09:36:14 2019 +0100

WW-5049 Drops empty space
---
 core/src/main/resources/xwork-2.6.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/resources/xwork-2.6.dtd 
b/core/src/main/resources/xwork-2.6.dtd
index 476b71b..ba6dddf 100644
--- a/core/src/main/resources/xwork-2.6.dtd
+++ b/core/src/main/resources/xwork-2.6.dtd
@@ -30,7 +30,7 @@
"http://struts.apache.org/dtds/xwork-2.6.dtd";>
 -->
 
-
+
 



[struts] 09/14: WW-5049 Sets proper order of configuration elements

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 7c6dfe193092af4f074c16d3bf1c1dc2a8e14c28
Author: Lukasz Lenart 
AuthorDate: Wed Nov 27 19:58:46 2019 +0100

WW-5049 Sets proper order of configuration elements
---
 .../xwork2/config/providers/XmlConfigurationProvider.java  |  7 ---
 core/src/main/resources/struts-2.6.dtd | 14 +++---
 core/src/main/resources/xwork-2.6.dtd  | 14 +++---
 plugins/velocity/src/main/resources/struts-plugin.xml  |  6 +++---
 4 files changed, 21 insertions(+), 20 deletions(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index 745f908..a314149 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -22,6 +22,7 @@ import com.opensymphony.xwork2.Action;
 import com.opensymphony.xwork2.FileManager;
 import com.opensymphony.xwork2.FileManagerFactory;
 import com.opensymphony.xwork2.ObjectFactory;
+import com.opensymphony.xwork2.config.BeanSelectionProvider;
 import com.opensymphony.xwork2.config.Configuration;
 import com.opensymphony.xwork2.config.ConfigurationException;
 import com.opensymphony.xwork2.config.ConfigurationProvider;
@@ -225,11 +226,11 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 String impl = child.getAttribute("class");
 try {
 Class classImpl = ClassLoaderUtil.loadClass(impl, 
getClass());
-if 
(ConfigurationProvider.class.isAssignableFrom(classImpl)) {
-ConfigurationProvider provider = 
(ConfigurationProvider) classImpl.newInstance();
+if 
(BeanSelectionProvider.class.isAssignableFrom(classImpl)) {
+BeanSelectionProvider provider = 
(BeanSelectionProvider) classImpl.newInstance();
 provider.register(containerBuilder, props);
 } else {
-throw new ConfigurationException("The 
bean-provider: name:" + name + " class:" + impl + " doesnt implement " + 
ConfigurationProvider.class.getName(), childNode);
+throw new ConfigurationException("The 
bean-provider: name:" + name + " class:" + impl + " does not implement " + 
BeanSelectionProvider.class.getName(), childNode);
 }
 } catch (ClassNotFoundException | 
IllegalAccessException | InstantiationException e) {
 throw new ConfigurationException("Unable to load 
bean-provider: name:" + name + " class:" + impl, e, childNode);
diff --git a/core/src/main/resources/struts-2.6.dtd 
b/core/src/main/resources/struts-2.6.dtd
index 6eb5654..84714cc 100644
--- a/core/src/main/resources/struts-2.6.dtd
+++ b/core/src/main/resources/struts-2.6.dtd
@@ -30,7 +30,7 @@
"http://struts.apache.org/dtds/struts-2.6.dtd";>
 -->
 
-
+
 
@@ -125,12 +125,6 @@
 file CDATA #REQUIRED
 >
 
-
-
-
 
 
 
+
+
+
 
 http://struts.apache.org/dtds/xwork-2.6.dtd";>
 -->
 
-
+
 
@@ -125,12 +125,6 @@
 file CDATA #REQUIRED
 >
 
-
-
-
 
 
 
+
+
+
 
 
 
-
-
-
+
 
 
@@ -41,4 +39,6 @@
 
 
 
+
+
 



[struts] 07/14: WW-5049 Renames default bean provider

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 84f84380266f461eecc3c6e8f3febf65c055695b
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 20:36:21 2019 +0100

WW-5049 Renames default bean provider
---
 ...vider.java => StrutsBeanSelectionProvider.java} |   2 +-
 .../org/apache/struts2/dispatcher/Dispatcher.java  |   4 +-
 .../struts2/dispatcher/StaticContentLoader.java| 120 +++--
 core/src/main/resources/struts-default.xml |   4 +-
 ...t.java => StrutsBeanSelectionProviderTest.java} |   2 +-
 .../velocity/VelocityBeanSelectionProvider.java|   3 +-
 6 files changed, 69 insertions(+), 66 deletions(-)

diff --git 
a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
 b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java
similarity index 99%
rename from 
core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
rename to 
core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java
index 1e976f0..2551f77 100644
--- 
a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
+++ 
b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java
@@ -364,7 +364,7 @@ import org.apache.struts2.views.util.UrlHelper;
  *   struts.configuration.xml.reload = true
  * 
  */
-public class DefaultBeanSelectionProvider extends 
AbstractBeanSelectionProvider {
+public class StrutsBeanSelectionProvider extends AbstractBeanSelectionProvider 
{
 
 public void register(ContainerBuilder builder, LocatableProperties props) {
 alias(ObjectFactory.class, StrutsConstants.STRUTS_OBJECTFACTORY, 
builder, props);
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java 
b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
index 575de94..27d025b 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -44,7 +44,7 @@ import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.StrutsConstants;
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.StrutsStatics;
-import org.apache.struts2.config.DefaultBeanSelectionProvider;
+import org.apache.struts2.config.StrutsBeanSelectionProvider;
 import org.apache.struts2.config.DefaultPropertiesProvider;
 import org.apache.struts2.config.PropertiesConfigurationProvider;
 import org.apache.struts2.config.StrutsJavaConfiguration;
@@ -481,7 +481,7 @@ public class Dispatcher {
 }
 
 private void init_AliasStandardObjects() {
-configurationManager.addContainerProvider(new 
DefaultBeanSelectionProvider());
+configurationManager.addContainerProvider(new 
StrutsBeanSelectionProvider());
 }
 
 private Container init_PreloadConfiguration() {
diff --git 
a/core/src/main/java/org/apache/struts2/dispatcher/StaticContentLoader.java 
b/core/src/main/java/org/apache/struts2/dispatcher/StaticContentLoader.java
index cf4dd47..7859702 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/StaticContentLoader.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/StaticContentLoader.java
@@ -1,59 +1,61 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.struts2.dispatcher;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * Interface for loading static resources, based on a path. After implementing 
your own static content loader
- * you must tell the framework how to use it, eg.
- *
- * 
- * 
- *
- * Check {@link org.apache.struts2.config.DefaultBeanSelectionProvider} for 
more details.
- */
-public interface StaticContentLoader {
-
-/**
- * @param path Requested resource path
- * @return true if this loader is able to load this type of resou

[struts] 02/14: WW-5049 Allows define a custom bean provider

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5049-velocity-plugin
in repository https://gitbox.apache.org/repos/asf/struts.git

commit a7cfed7a9641d2f48a7656dee76412bb8efa9b5a
Author: Lukasz Lenart 
AuthorDate: Tue Nov 26 19:00:18 2019 +0100

WW-5049 Allows define a custom bean provider
---
 .../config/providers/XmlConfigurationProvider.java |  18 ++-
 core/src/main/resources/struts-2.6.dtd | 157 +
 .../velocity/src/main/resources/struts-plugin.xml  |   7 +-
 3 files changed, 177 insertions(+), 5 deletions(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
index 24d388e..dd61d81 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
@@ -219,7 +219,21 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 
 final String nodeName = child.getNodeName();
 
-if ("bean".equals(nodeName)) {
+if ("bean-provider".equals(nodeName)) {
+String name = child.getAttribute("name");
+String impl = child.getAttribute("class");
+try {
+Class classImpl = ClassLoaderUtil.loadClass(impl, 
getClass());
+if 
(classImpl.isAssignableFrom(ConfigurationProvider.class)) {
+ConfigurationProvider provider = 
(ConfigurationProvider) classImpl.newInstance();
+provider.register(containerBuilder, props);
+} else {
+throw new ConfigurationException("The 
bean-provider: name:" + name + " class:" + impl + " doesnt implement " + 
ConfigurationProvider.class.getName(), childNode);
+}
+} catch (ClassNotFoundException | 
IllegalAccessException | InstantiationException e) {
+throw new ConfigurationException("Unable to load 
bean-provider: name:" + name + " class:" + impl, e, childNode);
+}
+} else if ("bean".equals(nodeName)) {
 String type = child.getAttribute("type");
 String name = child.getAttribute("name");
 String impl = child.getAttribute("class");
@@ -233,8 +247,6 @@ public class XmlConfigurationProvider implements 
ConfigurationProvider {
 scope = Scope.REQUEST;
 } else if ("session".equals(scopeStr)) {
 scope = Scope.SESSION;
-} else if ("singleton".equals(scopeStr)) {
-scope = Scope.SINGLETON;
 } else if ("thread".equals(scopeStr)) {
 scope = Scope.THREAD;
 }
diff --git a/core/src/main/resources/struts-2.6.dtd 
b/core/src/main/resources/struts-2.6.dtd
new file mode 100644
index 000..6eb5654
--- /dev/null
+++ b/core/src/main/resources/struts-2.6.dtd
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/velocity/src/main/resources/struts-plugin.xml 
b/plugins/velocity/src/main/resources/struts-plugin.xml
index 00a4207..04842de 100644
--- a/plugins/velocity/src/main/resources/struts-plugin.xml
+++ b/plugins/velocity/src/main/resources/struts-plugin.xml
@@ -20,10 +20,13 @@
  */
 -->
 http://struts.apache.org/dtds/struts-2.5.dtd";>
+   "-//Apache Software Foundation//DTD Struts Configuration 2.6//EN"
+   "http://struts.apache.org/dtds/struts-2.6.dtd";>
 
 
+
+
+
 
 
 

[struts] branch master updated (8952cff -> 59e7caf)

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git.


from 8952cff  Merge pull request #391 from 
apache/WW-5003-drops-xwork-exception
 add 5c55e69  WW-5049 Moves Velocity support into a dedicated plugin
 add a7cfed7  WW-5049 Allows define a custom bean provider
 add ea8e2b5  Reorder modules to build apps at the end
 add d0039d1  WW-5049 Drops name as not needed
 add df4e193  WW-5049 Extends xwork DTD as well
 add 934b5d1  WW-5049 Includes the new plugin in assembly
 add 84f8438  WW-5049 Renames default bean provider
 add 868ec77  WW-5049 Adds missing internal dependency
 add 7c6dfe1  WW-5049 Sets proper order of configuration elements
 add 0009bde  WW-5049 Drops unused files
 add 9c1b0cf  WW-5049 Supports bean-selection via Java config
 add 503c8b7  WW-5047 Avoids confusion about scope's default value
 add 8d8b306  WW-5049 Drops empty space
 add a456b1f  WW-5049 Reverts to static final as this will be refactored 
anyway
 new 59e7caf  Merge pull request #384 from apache/WW-5049-velocity-plugin

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 apps/showcase/pom.xml  |   5 +
 .../showcase/src/main/resources/struts-tags-ui.xml |   2 +-
 assembly/src/main/assembly/all.xml |   4 +
 .../config/providers/XmlConfigurationProvider.java |  22 +++-
 .../java/org/apache/struts2/StrutsConstants.java   |   3 -
 ...vider.java => StrutsBeanSelectionProvider.java} |   6 +-
 .../struts2/config/StrutsJavaConfiguration.java|   4 +
 .../config/StrutsJavaConfigurationProvider.java|  35 --
 .../config/StrutsXmlConfigurationProvider.java |   1 +
 .../config/entities/BeanSelectionConfig.java   |  35 +++---
 .../struts2/config/entities/ConstantConfig.java|   1 -
 .../org/apache/struts2/dispatcher/Dispatcher.java  |   4 +-
 .../struts2/dispatcher/StaticContentLoader.java| 120 +++--
 .../apache/struts2/views/DefaultTagLibrary.java|  90 +---
 .../struts2/views/TagLibraryDirectiveProvider.java |   2 +-
 .../resources/{struts-2.5.dtd => struts-2.6.dtd}   |  12 ++-
 core/src/main/resources/struts-default.xml |   8 +-
 .../resources/template/archive/ajax/a-close.vm |  21 
 core/src/main/resources/template/archive/ajax/a.vm |  33 --
 .../resources/template/archive/ajax/div-close.vm   |  21 
 .../main/resources/template/archive/ajax/div.vm|  35 --
 .../resources/template/archive/ajax/form-close.vm  |  22 
 .../main/resources/template/archive/ajax/form.vm   |  39 ---
 .../main/resources/template/archive/ajax/submit.vm |  33 --
 .../resources/template/archive/ajax/tab-close.vm   |  27 -
 .../main/resources/template/archive/ajax/tab.vm|  37 ---
 .../resources/template/archive/simple/checkbox.vm  |  30 --
 .../template/archive/simple/checkboxlist.vm|  45 
 .../resources/template/archive/simple/combobox.vm  |  43 
 .../resources/template/archive/simple/debug.vm |  85 ---
 .../template/archive/simple/doubleselect.vm| 108 ---
 .../resources/template/archive/simple/empty.vm |  20 
 .../main/resources/template/archive/simple/file.vm |  32 --
 .../template/archive/simple/form-close.vm  |  21 
 .../main/resources/template/archive/simple/form.vm |  32 --
 .../resources/template/archive/simple/hidden.vm|  28 -
 .../resources/template/archive/simple/label.vm |  26 -
 .../resources/template/archive/simple/password.vm  |  34 --
 .../resources/template/archive/simple/radiomap.vm  |  55 --
 .../template/archive/simple/scripting-events.vm|  34 --
 .../resources/template/archive/simple/select.vm|  63 ---
 .../resources/template/archive/simple/submit.vm|  27 -
 .../resources/template/archive/simple/table.vm | 101 -
 .../main/resources/template/archive/simple/text.vm |  34 --
 .../resources/template/archive/simple/textarea.vm  |  33 --
 .../resources/template/archive/simple/token.vm |  22 
 .../resources/template/archive/xhtml/checkbox.vm   |  39 ---
 .../template/archive/xhtml/checkboxlist.vm |  23 
 .../resources/template/archive/xhtml/combobox.vm   |  21 
 .../template/archive/xhtml/controlfooter.vm|  22 
 .../template/archive/xhtml/controlheader.vm|  47 
 .../main/resources/template/archive/xhtml/debug.vm |  21 
 .../template/archive/xhtml/doubleselect.vm |  21 
 .../main/resources/template/archive/xhtml/empty.vm |  20 
 .../main/resources/template/archive/xhtml/fi

[struts] 01/01: Merge pull request #384 from apache/WW-5049-velocity-plugin

2019-12-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 59e7caf404021b5dd54716ac5a61ce5b9a53f231
Merge: 8952cff a456b1f
Author: Lukasz Lenart 
AuthorDate: Sun Dec 29 16:30:34 2019 +0100

Merge pull request #384 from apache/WW-5049-velocity-plugin

[WW-5049] Velocity plugin

 apps/showcase/pom.xml  |   5 +
 .../showcase/src/main/resources/struts-tags-ui.xml |   2 +-
 assembly/src/main/assembly/all.xml |   4 +
 .../config/providers/XmlConfigurationProvider.java |  22 ++-
 .../java/org/apache/struts2/StrutsConstants.java   |   3 -
 ...vider.java => StrutsBeanSelectionProvider.java} |   6 +-
 .../struts2/config/StrutsJavaConfiguration.java|   4 +
 .../config/StrutsJavaConfigurationProvider.java|  35 -
 .../config/StrutsXmlConfigurationProvider.java |   1 +
 .../entities/BeanSelectionConfig.java} |  33 ++---
 .../struts2/config/entities/ConstantConfig.java|   1 -
 .../org/apache/struts2/dispatcher/Dispatcher.java  |   4 +-
 .../struts2/dispatcher/StaticContentLoader.java| 120 
 .../apache/struts2/views/DefaultTagLibrary.java|  90 +---
 .../struts2/views/TagLibraryDirectiveProvider.java |   2 +-
 core/src/main/resources/struts-2.6.dtd | 157 +
 core/src/main/resources/struts-default.xml |   8 +-
 .../resources/template/archive/ajax/a-close.vm |  21 ---
 core/src/main/resources/template/archive/ajax/a.vm |  33 -
 .../resources/template/archive/ajax/div-close.vm   |  21 ---
 .../main/resources/template/archive/ajax/div.vm|  35 -
 .../resources/template/archive/ajax/form-close.vm  |  22 ---
 .../main/resources/template/archive/ajax/form.vm   |  39 -
 .../main/resources/template/archive/ajax/submit.vm |  33 -
 .../resources/template/archive/ajax/tab-close.vm   |  27 
 .../main/resources/template/archive/ajax/tab.vm|  37 -
 .../resources/template/archive/simple/checkbox.vm  |  30 
 .../template/archive/simple/checkboxlist.vm|  45 --
 .../resources/template/archive/simple/combobox.vm  |  43 --
 .../resources/template/archive/simple/debug.vm |  85 ---
 .../template/archive/simple/doubleselect.vm| 108 --
 .../resources/template/archive/simple/empty.vm |  20 ---
 .../main/resources/template/archive/simple/file.vm |  32 -
 .../template/archive/simple/form-close.vm  |  21 ---
 .../main/resources/template/archive/simple/form.vm |  32 -
 .../resources/template/archive/simple/hidden.vm|  28 
 .../resources/template/archive/simple/label.vm |  26 
 .../resources/template/archive/simple/password.vm  |  34 -
 .../resources/template/archive/simple/radiomap.vm  |  55 
 .../template/archive/simple/scripting-events.vm|  34 -
 .../resources/template/archive/simple/select.vm|  63 -
 .../resources/template/archive/simple/submit.vm|  27 
 .../resources/template/archive/simple/table.vm | 101 -
 .../main/resources/template/archive/simple/text.vm |  34 -
 .../resources/template/archive/simple/textarea.vm  |  33 -
 .../resources/template/archive/simple/token.vm |  22 ---
 .../resources/template/archive/xhtml/checkbox.vm   |  39 -
 .../template/archive/xhtml/checkboxlist.vm |  23 ---
 .../resources/template/archive/xhtml/combobox.vm   |  21 ---
 .../template/archive/xhtml/controlfooter.vm|  22 ---
 .../template/archive/xhtml/controlheader.vm|  47 --
 .../main/resources/template/archive/xhtml/debug.vm |  21 ---
 .../template/archive/xhtml/doubleselect.vm |  21 ---
 .../main/resources/template/archive/xhtml/empty.vm |  20 ---
 .../main/resources/template/archive/xhtml/file.vm  |  21 ---
 .../resources/template/archive/xhtml/form-close.vm |  22 ---
 .../main/resources/template/archive/xhtml/form.vm  |  28 
 .../resources/template/archive/xhtml/hidden.vm |  21 ---
 .../main/resources/template/archive/xhtml/label.vm |  21 ---
 .../resources/template/archive/xhtml/password.vm   |  21 ---
 .../resources/template/archive/xhtml/radiomap.vm   |  21 ---
 .../resources/template/archive/xhtml/select.vm |  21 ---
 .../resources/template/archive/xhtml/submit.vm |  23 ---
 .../main/resources/template/archive/xhtml/table.vm |  21 ---
 .../main/resources/template/archive/xhtml/text.vm  |  21 ---
 .../main/resources/template/archive/xhtml/token.vm |  21 ---
 core/src/main/resources/xwork-2.6.dtd  | 157 +
 .../xwork2/util/location/LocationUtilsTest.java|   6 +
 ...t.java => StrutsBeanSelectionProviderTest.java} |   2 +-
 .../StrutsJavaConfigurationProviderTest.java   |  28 +++-
 .../struts2/config/TestBeanSelectionProvider.java} |  17 +--
 .../struts2/views/TemplateEngineManagerTest.java   |  12 +-