struts git commit: Adds additional pattern to prevent access to getClass method

2016-01-10 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master a4f8d4921 -> 74e26830d


Adds additional pattern to prevent access to getClass method


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/74e26830
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/74e26830
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/74e26830

Branch: refs/heads/master
Commit: 74e26830d2849a84729b33497f729e0f033dc147
Parents: a4f8d49
Author: Lukasz Lenart 
Authored: Sun Jan 10 11:46:46 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 11:47:25 2016 +0100

--
 .../xwork2/security/DefaultExcludedPatternsChecker.java | 1 +
 .../xwork2/interceptor/ParametersInterceptorTest.java   | 9 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/74e26830/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
--
diff --git 
a/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
 
b/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
index 13e091e..84840f5 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
@@ -17,6 +17,7 @@ public class DefaultExcludedPatternsChecker implements 
ExcludedPatternsChecker {
 
 public static final String[] EXCLUDED_PATTERNS = {
 
"(^|\\%\\{)((#?)(top(\\.|\\['|\\[\")|\\[\\d\\]\\.)?)(dojo|struts|session|request|response|application|servlet(Request|Response|Context)|parameters|context|_memberAccess)(\\.|\\[).*",
+".*(^|\\.|\\[|\\'|\"|get)class(\\(\\.|\\[|\\'|\").*",
 "^(action|method):.*"
 };
 

http://git-wip-us.apache.org/repos/asf/struts/blob/74e26830/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
--
diff --git 
a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
 
b/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
index 225d053..d5eef86 100644
--- 
a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
+++ 
b/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
@@ -83,6 +83,7 @@ public class ParametersInterceptorTest extends XWorkTestCase {
 "java.lang.Boolean(false), 
#_memberAccess[\"allowStaticMethodAccess\"]= new java.lang.Boolean(true), " +
 "@java.lang.Runtime@getRuntime().exec('mkdir 
/tmp/PWNAGE'))(meh)");
 put("top['name'](0)", "true");
+put("expression", 
"#f=#_memberAccess.getClass().getDeclaredField('allowStaticMethodAccess'),#f.setAccessible(true),#f.set(#_memberAccess,true),#req=@org.apache.struts2.ServletActionContext@getRequest(),#resp=@org.apache.struts2.ServletActionContext@getResponse().getWriter(),#resp.println(#req.getRealPath('/')),#resp.close()");
 }
 };
 
@@ -95,13 +96,15 @@ public class ParametersInterceptorTest extends 
XWorkTestCase {
 pi.setParameters(action, vs, params);
 
 // then
-assertEquals(2, action.getActionMessages().size());
+assertEquals(3, action.getActionMessages().size());
 
 String msg1 = action.getActionMessage(0);
 String msg2 = action.getActionMessage(1);
+String msg3 = action.getActionMessage(2);
 
-assertEquals("Error setting expression 'name' with value 
'(#context[\"xwork.MethodAccessor.denyMethodExecution\"]= new 
java.lang.Boolean(false), #_memberAccess[\"allowStaticMethodAccess\"]= new 
java.lang.Boolean(true), @java.lang.Runtime@getRuntime().exec('mkdir 
/tmp/PWNAGE'))(meh)'", msg1);
-assertEquals("Error setting expression 'top['name'](0)' with value 
'true'", msg2);
+assertEquals("Error setting expression 'expression' with value 
'#f=#_memberAccess.getClass().getDeclaredField('allowStaticMethodAccess'),#f.setAccessible(true),#f.set(#_memberAccess,true),#req=@org.apache.struts2.ServletActionContext@getRequest(),#resp=@org.apache.struts2.ServletActionContext@getResponse().getWriter(),#resp.println(#req.getRealPath('/')),#resp.close()'",
 msg1);
+assertEquals("Error setting expression 'name' with value 
'(#context[\"xwork.MethodAccessor.denyMethodExecution\"]= new 
java.lang.Boolean(false), #_memberAccess[\"allowStaticMethodAccess\"]= new 
java.lang.Boolean(true), @java.lang.Runtime@getRuntime().exec('mkdir 
/tmp/PWNAGE'))(meh)'", msg2);
+assertEquals("Error setting expression 'top['name'](0

struts git commit: Prevents eval expressions at all

2016-01-10 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master 74e26830d -> 61a7ee296


Prevents eval expressions at all


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/61a7ee29
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/61a7ee29
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/61a7ee29

Branch: refs/heads/master
Commit: 61a7ee296161bbfa61e90871649598a2e4a680a2
Parents: 74e2683
Author: Lukasz Lenart 
Authored: Sun Jan 10 12:00:10 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 12:00:10 2016 +0100

--
 .../java/com/opensymphony/xwork2/ognl/OgnlUtil.java |  8 ++--
 .../com/opensymphony/xwork2/ognl/OgnlValueStack.java| 12 
 2 files changed, 6 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/61a7ee29/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
--
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java 
b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
index f6f2ea8..8143613 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
@@ -273,14 +273,10 @@ public class OgnlUtil {
  *
  * @throws OgnlException in case of ognl errors
  */
-public void setValue(String name, Map context, Object 
root, Object value) throws OgnlException {
-setValue(name, context, root, value, true);
-}
-
-protected void setValue(String name, final Map context, 
final Object root, final Object value, final boolean evalName) throws 
OgnlException {
+public void setValue(final String name, final Map context, 
final Object root, final Object value) throws OgnlException {
 compileAndExecute(name, context, new OgnlTask() {
 public Void execute(Object tree) throws OgnlException {
-if (!evalName && isEvalExpression(tree, context)) {
+if (isEvalExpression(tree, context)) {
 throw new OgnlException("Eval expression cannot be used as 
parameter name");
 }
 Ognl.setValue(tree, context, root, value);

http://git-wip-us.apache.org/repos/asf/struts/blob/61a7ee29/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
--
diff --git 
a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java 
b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
index af7fbc5..4394d03 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
@@ -148,7 +148,7 @@ public class OgnlValueStack implements Serializable, 
ValueStack, ClearableValueS
  * @see com.opensymphony.xwork2.util.ValueStack#setParameter(String, 
Object)
  */
 public void setParameter(String expr, Object value) {
-setValue(expr, value, devMode, false);
+setValue(expr, value, devMode);
 }
 
 /**
@@ -164,13 +164,9 @@ public class OgnlValueStack implements Serializable, 
ValueStack, ClearableValueS
  * @see com.opensymphony.xwork2.util.ValueStack#setValue(java.lang.String, 
java.lang.Object, boolean)
  */
 public void setValue(String expr, Object value, boolean 
throwExceptionOnFailure) {
-setValue(expr, value, throwExceptionOnFailure, true);
-}
-
-private void setValue(String expr, Object value, boolean 
throwExceptionOnFailure, boolean evalExpression) {
 Map context = getContext();
 try {
-trySetValue(expr, value, throwExceptionOnFailure, context, 
evalExpression);
+trySetValue(expr, value, throwExceptionOnFailure, context);
 } catch (OgnlException e) {
 handleOgnlException(expr, value, throwExceptionOnFailure, e);
 } catch (RuntimeException re) { //XW-281
@@ -180,10 +176,10 @@ public class OgnlValueStack implements Serializable, 
ValueStack, ClearableValueS
 }
 }
 
-private void trySetValue(String expr, Object value, boolean 
throwExceptionOnFailure, Map context, boolean evalExpression) 
throws OgnlException {
+private void trySetValue(String expr, Object value, boolean 
throwExceptionOnFailure, Map context) throws OgnlException {
 context.put(XWorkConverter.CONVERSION_PROPERTY_FULLNAME, expr);
 context.put(REPORT_ERRORS_ON_NO_PROP, (throwExceptionOnFailure) ? 
Boolean.TRUE : Boolean.FALSE);
-ognlUtil.setValue(expr, context, root, value, evalExpression);
+ognlUtil.setValue(expr, context, root, value);
 }
 
 private void cleanUpContext(Map context) {



[1/2] struts git commit: Ports blocking eval expressions from commit 61a7ee296161bbfa61e90871649598a2e4a680a2

2016-01-10 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/support-2-3 b448d7995 -> bd1a121b8


Ports blocking eval expressions from commit 
61a7ee296161bbfa61e90871649598a2e4a680a2


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/bd1a121b
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/bd1a121b
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/bd1a121b

Branch: refs/heads/support-2-3
Commit: bd1a121b8286c412f5fc84c61599c293483fc11a
Parents: 6177cf3
Author: Lukasz Lenart 
Authored: Sun Jan 10 12:17:02 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 12:17:34 2016 +0100

--
 .../java/com/opensymphony/xwork2/ognl/OgnlUtil.java |  8 ++--
 .../com/opensymphony/xwork2/ognl/OgnlValueStack.java| 12 
 2 files changed, 6 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/bd1a121b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java 
b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
index 63c45fe..6736076 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
@@ -274,14 +274,10 @@ public class OgnlUtil {
  * Wrapper around Ognl.setValue() to handle type conversion for collection 
elements.
  * Ideally, this should be handled by OGNL directly.
  */
-public void setValue(String name, Map context, Object 
root, Object value) throws OgnlException {
-setValue(name, context, root, value, true);
-}
-
-protected void setValue(String name, final Map context, 
final Object root, final Object value, final boolean evalName) throws 
OgnlException {
+public void setValue(final String name, final Map context, 
final Object root, final Object value) throws OgnlException {
 compileAndExecute(name, context, new OgnlTask() {
 public Void execute(Object tree) throws OgnlException {
-if (!evalName && isEvalExpression(tree, context)) {
+if (isEvalExpression(tree, context)) {
 throw new OgnlException("Eval expression cannot be used as 
parameter name");
 }
 Ognl.setValue(tree, context, root, value);

http://git-wip-us.apache.org/repos/asf/struts/blob/bd1a121b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java 
b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
index 1b09ef6..f221e67 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
@@ -148,7 +148,7 @@ public class OgnlValueStack implements Serializable, 
ValueStack, ClearableValueS
  * @see com.opensymphony.xwork2.util.ValueStack#setParameter(String, 
Object)
  */
 public void setParameter(String expr, Object value) {
-setValue(expr, value, devMode, false);
+setValue(expr, value, devMode);
 }
 
 /**
@@ -164,13 +164,9 @@ public class OgnlValueStack implements Serializable, 
ValueStack, ClearableValueS
  * @see com.opensymphony.xwork2.util.ValueStack#setValue(java.lang.String, 
java.lang.Object, boolean)
  */
 public void setValue(String expr, Object value, boolean 
throwExceptionOnFailure) {
-setValue(expr, value, throwExceptionOnFailure, true);
-}
-
-private void setValue(String expr, Object value, boolean 
throwExceptionOnFailure, boolean evalExpression) {
 Map context = getContext();
 try {
-trySetValue(expr, value, throwExceptionOnFailure, context, 
evalExpression);
+trySetValue(expr, value, throwExceptionOnFailure, context);
 } catch (OgnlException e) {
 handleOgnlException(expr, value, throwExceptionOnFailure, e);
 } catch (RuntimeException re) { //XW-281
@@ -180,10 +176,10 @@ public class OgnlValueStack implements Serializable, 
ValueStack, ClearableValueS
 }
 }
 
-private void trySetValue(String expr, Object value, boolean 
throwExceptionOnFailure, Map context, boolean evalExpression) 
throws OgnlException {
+private void trySetValue(String expr, Object value, boolean 
throwExceptionOnFailure, Map context) throws OgnlException {
 context.put(XWorkConverter.CONVERSION_PROPERTY_FULLNAME, expr);
 context.put(REPORT_ERRORS_ON_NO_PROP, (throwExceptionOnFailure) ? 
Boolean.TRUE : Boolean.FALSE);
-   

[2/2] struts git commit: Ports exclude access Class from commit 74e26830d2849a84729b33497f729e0f033dc147

2016-01-10 Thread lukaszlenart
Ports exclude access Class from commit 74e26830d2849a84729b33497f729e0f033dc147


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6177cf33
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6177cf33
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6177cf33

Branch: refs/heads/support-2-3
Commit: 6177cf3387ad2daf0be30eae1c47c1f8dcc72122
Parents: b448d79
Author: Lukasz Lenart 
Authored: Sun Jan 10 12:10:34 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 12:17:34 2016 +0100

--
 .../xwork2/security/DefaultExcludedPatternsChecker.java | 1 +
 .../xwork2/interceptor/ParametersInterceptorTest.java   | 9 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/6177cf33/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
index 93d72ca..e23f6f4 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
@@ -17,6 +17,7 @@ public class DefaultExcludedPatternsChecker implements 
ExcludedPatternsChecker {
 
 public static final String[] EXCLUDED_PATTERNS = {
 
"(^|\\%\\{)((#?)(top(\\.|\\['|\\[\")|\\[\\d\\]\\.)?)(dojo|struts|session|request|response|application|servlet(Request|Response|Context)|parameters|context|_memberAccess)(\\.|\\[).*",
+".*(^|\\.|\\[|\\'|\"|get)class(\\(\\.|\\[|\\'|\").*",
 "^(action|method):.*"
 };
 

http://git-wip-us.apache.org/repos/asf/struts/blob/6177cf33/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
--
diff --git 
a/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
 
b/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
index 5dcc3e0..b8f798a 100644
--- 
a/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
+++ 
b/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
@@ -98,6 +98,7 @@ public class ParametersInterceptorTest extends XWorkTestCase {
 "java.lang.Boolean(false), 
#_memberAccess[\"allowStaticMethodAccess\"]= new java.lang.Boolean(true), " +
 "@java.lang.Runtime@getRuntime().exec('mkdir 
/tmp/PWNAGE'))(meh)");
 put("top['name'](0)", "true");
+put("expression", 
"#f=#_memberAccess.getClass().getDeclaredField('allowStaticMethodAccess'),#f.setAccessible(true),#f.set(#_memberAccess,true),#req=@org.apache.struts2.ServletActionContext@getRequest(),#resp=@org.apache.struts2.ServletActionContext@getResponse().getWriter(),#resp.println(#req.getRealPath('/')),#resp.close()");
 }
 };
 
@@ -110,13 +111,15 @@ public class ParametersInterceptorTest extends 
XWorkTestCase {
 pi.setParameters(action, vs, params);
 
 // then
-assertEquals(2, action.getActionMessages().size());
+assertEquals(3, action.getActionMessages().size());
 
 String msg1 = action.getActionMessage(0);
 String msg2 = action.getActionMessage(1);
+String msg3 = action.getActionMessage(2);
 
-assertEquals("Error setting expression 'name' with value 
'(#context[\"xwork.MethodAccessor.denyMethodExecution\"]= new 
java.lang.Boolean(false), #_memberAccess[\"allowStaticMethodAccess\"]= new 
java.lang.Boolean(true), @java.lang.Runtime@getRuntime().exec('mkdir 
/tmp/PWNAGE'))(meh)'", msg1);
-assertEquals("Error setting expression 'top['name'](0)' with value 
'true'", msg2);
+assertEquals("Error setting expression 'expression' with value 
'#f=#_memberAccess.getClass().getDeclaredField('allowStaticMethodAccess'),#f.setAccessible(true),#f.set(#_memberAccess,true),#req=@org.apache.struts2.ServletActionContext@getRequest(),#resp=@org.apache.struts2.ServletActionContext@getResponse().getWriter(),#resp.println(#req.getRealPath('/')),#resp.close()'",
 msg1);
+assertEquals("Error setting expression 'name' with value 
'(#context[\"xwork.MethodAccessor.denyMethodExecution\"]= new 
java.lang.Boolean(false), #_memberAccess[\"allowStaticMethodAccess\"]= new 
java.lang.Boolean(true), @java.lang.Runtime@getRuntime().exec('mkdir 
/tmp/PWNAGE'))(meh)'", msg2);
+assertEquals("Error setting expression 'top['name

[05/16] struts git commit: Updates Portal Tiles integration (cherry picked from commit 6edc0ff)

2016-01-10 Thread lukaszlenart
Updates Portal Tiles integration
(cherry picked from commit 6edc0ff)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/ddeb7f0f
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/ddeb7f0f
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/ddeb7f0f

Branch: refs/heads/support-2-3
Commit: ddeb7f0f7cc2600ceb36b8532fc433861a38c20e
Parents: 5d30eb1
Author: Lukasz Lenart 
Authored: Wed Nov 25 20:37:42 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:36:16 2015 +0100

--
 plugins/portlet-tiles/pom.xml   |  4 
 .../struts2/views/tiles/PortletTilesResult.java | 25 +++-
 pom.xml |  5 
 3 files changed, 17 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/ddeb7f0f/plugins/portlet-tiles/pom.xml
--
diff --git a/plugins/portlet-tiles/pom.xml b/plugins/portlet-tiles/pom.xml
index c2793d7..333c570 100644
--- a/plugins/portlet-tiles/pom.xml
+++ b/plugins/portlet-tiles/pom.xml
@@ -43,6 +43,10 @@
  struts2-portlet-plugin
 
 
+org.apache.tiles
+tiles-portlet
+
+
 javax.servlet
 jsp-api
 provided

http://git-wip-us.apache.org/repos/asf/struts/blob/ddeb7f0f/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
--
diff --git 
a/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
 
b/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
index c08a99b..ea134d8 100644
--- 
a/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
+++ 
b/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
@@ -9,6 +9,7 @@ import org.apache.struts2.portlet.context.PortletActionContext;
 import org.apache.tiles.TilesContainer;
 import org.apache.tiles.TilesException;
 import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.portlet.context.PortletUtil;
 
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletException;
@@ -19,11 +20,13 @@ import java.io.IOException;
 import java.util.Map;
 
 /**
- * JIRA WW-2749 (STRUTS).
+ * Dedicated Tile result to be used in Portlet environment
+ *
+ * WW-2749
  */
 public class PortletTilesResult extends ServletDispatcherResult {
 
-private static final long serialVersionUID = -3806939435493086244L;
+public static final String TILES_ACTION_NAME = "tilesDirect";
 
 public PortletTilesResult() {
 super();
@@ -33,10 +36,7 @@ public class PortletTilesResult extends 
ServletDispatcherResult {
 super(location);
 }
 
-// FIXME PATCH du JIRA WW-2749 (STRUTS)
-public void doExecute(String location, ActionInvocation invocation)
-throws IOException, TemplateException, PortletException, 
TilesException {
-
+public void doExecute(String location, ActionInvocation invocation) throws 
Exception {
 if (PortletActionContext.getPhase().isAction() || 
PortletActionContext.getPhase().isEvent()) {
 executeActionResult(location, invocation);
 } else {
@@ -44,15 +44,10 @@ public class PortletTilesResult extends 
ServletDispatcherResult {
 }
 }
 
-/**
- * @param location
- * @throws TilesException
- */
 protected void executeRenderResult(String location) throws TilesException {
 setLocation(location);
 
-ServletContext servletContext = 
ServletActionContext.getServletContext();
-TilesContainer container = TilesAccess.getContainer(servletContext);
+TilesContainer container = 
PortletUtil.getContainer(PortletActionContext.getPortletContext());
 
 HttpServletRequest request = ServletActionContext.getRequest();
 HttpServletResponse response = ServletActionContext.getResponse();
@@ -60,14 +55,10 @@ public class PortletTilesResult extends 
ServletDispatcherResult {
 container.render(location, request, response);
 }
 
-/**
- * @param location
- * @param invocation
- */
 protected void executeActionResult(String location, ActionInvocation 
invocation) {
 ActionResponse res = PortletActionContext.getActionResponse();
 
-res.setRenderParameter(PortletConstants.ACTION_PARAM, "tilesDirect");
+res.setRenderParameter(PortletConstants.ACTION_PARAM, 
TILES_ACTION_NAME);
 
 Map sessionMap = 
invocation.getInvocationContext().getSession();
 sessionMap.put(PortletConstants.RENDER_DIRECT_LOCATION, location);

http://git-wip-us.apache.org/re

[07/16] struts git commit: Registers Tiles model (cherry picked from commit 388861f)

2016-01-10 Thread lukaszlenart
Registers Tiles model
(cherry picked from commit 388861f)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f19e4be9
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f19e4be9
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f19e4be9

Branch: refs/heads/support-2-3
Commit: f19e4be947c00511a91ea2d806c9c483694f7485
Parents: 913944b
Author: Lukasz Lenart 
Authored: Fri Nov 27 13:36:52 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:36:28 2015 +0100

--
 .../StrutsFreeMarkerAttributeRenderer.java  | 27 +++-
 1 file changed, 26 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/f19e4be9/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
index 032f7e6..849053a 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
@@ -23,18 +23,25 @@ import com.opensymphony.xwork2.ActionContext;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.config.ConfigurationException;
 import com.opensymphony.xwork2.inject.Container;
+import freemarker.ext.beans.BeanModel;
+import freemarker.template.Configuration;
 import freemarker.template.TemplateException;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.views.JspSupportServlet;
+import org.apache.struts2.views.freemarker.FreemarkerManager;
 import org.apache.struts2.views.freemarker.FreemarkerResult;
+import org.apache.struts2.views.freemarker.StrutsBeanWrapper;
 import org.apache.tiles.Attribute;
 import org.apache.tiles.context.TilesRequestContext;
+import org.apache.tiles.freemarker.template.TilesFMModelRepository;
 import org.apache.tiles.impl.InvalidTemplateException;
 import org.apache.tiles.renderer.impl.AbstractTypeDetectingAttributeRenderer;
 import org.apache.tiles.servlet.context.ServletTilesRequestContext;
 import org.apache.tiles.servlet.context.ServletUtil;
 
+import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 
@@ -55,7 +62,8 @@ public class StrutsFreeMarkerAttributeRenderer extends 
AbstractTypeDetectingAttr
 if (ctx == null) {
 throw new ConfigurationException("There is no 
ActionContext for current request!");
 }
-ActionInvocation invocation = ctx.getActionInvocation();
+
+registerTilesBeanModel(ctx);
 
 String include = (String) value;
 FreemarkerResult result = new FreemarkerResult(include);
@@ -65,6 +73,7 @@ public class StrutsFreeMarkerAttributeRenderer extends 
AbstractTypeDetectingAttr
 container.inject(result);
 
 try {
+ActionInvocation invocation = ctx.getActionInvocation();
 result.doExecute(include, invocation);
 } catch (TemplateException e) {
 LOG.error("Exception was thrown during rendering value {}: 
{}", value, e.getMessage());
@@ -88,4 +97,20 @@ public class StrutsFreeMarkerAttributeRenderer extends 
AbstractTypeDetectingAttr
 return false;
 }
 
+/**
+ * This register dedicated BeanModel to support tiles tags.
+ * It requires {@link org.apache.struts2.views.JspSupportServlet} to be 
registered in web.xml
+ */
+protected void registerTilesBeanModel(ActionContext ctx) {
+ServletContext servletContext = 
ServletActionContext.getServletContext();
+Configuration configuration = 
ctx.getInstance(FreemarkerManager.class).getConfiguration(servletContext);
+
+StrutsBeanWrapper wrapper = (StrutsBeanWrapper) 
ctx.getInstance(FreemarkerManager.class).getWrapper();
+
+LOG.trace("Adding support for Tiles tags, please remember to register 
{} in web.xml!", JspSupportServlet.class.getName());
+
+BeanModel tilesBeanModel = new BeanModel(new TilesFMModelRepository(), 
wrapper);
+configuration.setSharedVariable("tiles", tilesBeanModel);
+}
+
 }



[03/16] struts git commit: Drops unused classes (cherry picked from commit 24a5bce)

2016-01-10 Thread lukaszlenart
Drops unused classes
(cherry picked from commit 24a5bce)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/efcea81b
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/efcea81b
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/efcea81b

Branch: refs/heads/support-2-3
Commit: efcea81b67d260835eff9c811efe20a816df7213
Parents: 9862580
Author: Lukasz Lenart 
Authored: Wed Nov 25 20:29:24 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:36:04 2015 +0100

--
 .../struts2/tiles/ConfiguredServletContext.java | 187 ---
 .../tiles/StrutsTilesRequestContext.java| 123 
 2 files changed, 310 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/efcea81b/plugins/tiles/src/main/java/org/apache/struts2/tiles/ConfiguredServletContext.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/ConfiguredServletContext.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/ConfiguredServletContext.java
deleted file mode 100644
index dfc1408..000
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/ConfiguredServletContext.java
+++ /dev/null
@@ -1,187 +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.
- */
-
-package org.apache.struts2.tiles;
-
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * ServletContext implementation which allows Struts
- * to inject initialization parameters into the context
- * in order to reduce the amount of configuration required
- * within web.xml for using Tiles.
- *
- * The specified init parameters are only utilized if
- * they are not explicitaly defined in the web.xml
- *
- * @version $Rev$
- * @since Struts 2.0.1
- */
-@SuppressWarnings("deprecation")
-public class ConfiguredServletContext implements ServletContext {
-
-private ServletContext rootContext;
-private Map initParameters;
-
-
-public ConfiguredServletContext(ServletContext context, Map initParameters) {
-this.rootContext = context;
-this.initParameters = initParameters;
-}
-
-public ServletContext getContext(String string) {
-return rootContext.getContext(string);
-}
-
-public int getMajorVersion() {
-return rootContext.getMajorVersion();
-}
-
-public int getMinorVersion() {
-return rootContext.getMinorVersion();
-}
-
-public String getMimeType(String string) {
-return rootContext.getMimeType(string);
-}
-
-public Set getResourcePaths(String string) {
-return rootContext.getResourcePaths(string);
-}
-
-public URL getResource(String string) throws MalformedURLException {
-return rootContext.getResource(string);
-}
-
-public InputStream getResourceAsStream(String string) {
-return rootContext.getResourceAsStream(string);
-}
-
-public RequestDispatcher getRequestDispatcher(String string) {
-return rootContext.getRequestDispatcher(string);
-}
-
-public RequestDispatcher getNamedDispatcher(String string) {
-return rootContext.getNamedDispatcher(string);
-}
-
-@SuppressWarnings("deprecation")
-public Servlet getServlet(String string) throws ServletException {
-return rootContext.getServlet(string);
-}
-
-@SuppressWarnings("deprecation")
-public Enumeration getServlets() {
-return rootContext.getServlets();  //To change body of implemented 
methods use File | Settings | File Templates.
-}
-
-@SuppressWarnings("deprecation")
-public Enumeration getServletNames() {
-return rootContext.getServletNames();
-}
-
-public void log(String string) {
-rootContext.log(string);
-}
-
-@SuppressWarnings("deprecation")
-pub

[16/16] struts git commit: WW-4568 Upgrades the Tiles plugin to Tiles 2

2016-01-10 Thread lukaszlenart
WW-4568 Upgrades the Tiles plugin to Tiles 2


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/99796682
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/99796682
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/99796682

Branch: refs/heads/support-2-3
Commit: 997966829ae3bac1bf490daf30e56415aa84aec5
Parents: bd1a121 5ed7b36
Author: Lukasz Lenart 
Authored: Sun Jan 10 12:21:23 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 12:21:23 2016 +0100

--
 plugins/portlet-tiles/pom.xml   |   4 +
 .../struts2/views/tiles/PortletTilesResult.java |  46 ++--
 plugins/tiles/pom.xml   |  23 +-
 .../struts2/tiles/ConfiguredServletContext.java | 187 -
 .../StrutsFreeMarkerAttributeRenderer.java  | 116 
 .../tiles/StrutsTilesContainerFactory.java  | 271 ---
 .../struts2/tiles/StrutsTilesInitializer.java   |  46 
 .../struts2/tiles/StrutsTilesListener.java  |  54 +---
 .../tiles/StrutsTilesRequestContext.java| 123 -
 ...sWildcardServletTilesApplicationContext.java | 106 
 .../apache/struts2/views/tiles/TilesResult.java |   6 +-
 pom.xml |  35 ++-
 12 files changed, 592 insertions(+), 425 deletions(-)
--




[12/16] struts git commit: Uses the new context implementation

2016-01-10 Thread lukaszlenart
Uses the new context implementation


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5be1590a
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5be1590a
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5be1590a

Branch: refs/heads/support-2-3
Commit: 5be1590a6045068bee64bbc247a39b79a3d1fa58
Parents: f721d54
Author: Lukasz Lenart 
Authored: Sat Dec 19 10:14:40 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Dec 19 10:14:40 2015 +0100

--
 .../java/org/apache/struts2/tiles/StrutsTilesInitializer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/5be1590a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
index 5df819c..550c6b1 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
@@ -23,7 +23,6 @@ import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import org.apache.tiles.TilesApplicationContext;
 import org.apache.tiles.factory.AbstractTilesContainerFactory;
-import 
org.apache.tiles.servlet.wildcard.WildcardServletTilesApplicationContext;
 import org.apache.tiles.startup.AbstractTilesInitializer;
 
 import javax.servlet.ServletContext;
@@ -35,7 +34,7 @@ public class StrutsTilesInitializer extends 
AbstractTilesInitializer {
 @Override
 protected TilesApplicationContext 
createTilesApplicationContext(TilesApplicationContext preliminaryContext) {
 LOG.debug("Initializing Tiles wildcard support ...");
-return new WildcardServletTilesApplicationContext((ServletContext) 
preliminaryContext.getContext());
+return new 
StrutsWildcardServletTilesApplicationContext((ServletContext) 
preliminaryContext.getContext());
 }
 
 @Override



[01/16] struts git commit: Adds required dependencies (cherry picked from commit 85b2198)

2016-01-10 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/support-2-3 bd1a121b8 -> 997966829


Adds required dependencies
(cherry picked from commit 85b2198)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/1dc545e3
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/1dc545e3
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/1dc545e3

Branch: refs/heads/support-2-3
Commit: 1dc545e34c19520c0ba780b43c53a28f5e3e9484
Parents: 90dbf54
Author: Lukasz Lenart 
Authored: Wed Nov 25 20:22:31 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:34:55 2015 +0100

--
 plugins/tiles/pom.xml | 29 +
 pom.xml   | 41 +++--
 2 files changed, 68 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/1dc545e3/plugins/tiles/pom.xml
--
diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index 9114b2b..6e872ee 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -40,14 +40,43 @@
 
 
 org.apache.tiles
+tiles-servlet
+
+
+org.apache.tiles
 tiles-jsp
 runtime
 
 
+org.apache.tiles
+tiles-servlet-wildcard
+
+
+org.apache.tiles
+tiles-jsp
+
+
+org.apache.tiles
+tiles-freemarker
+
+
+org.apache.tiles
+tiles-ognl
+
+
+org.apache.tiles
+tiles-el
+
+
 javax.servlet
 jsp-api
 provided
 
+
+javax.el
+el-api
+provided
+
 
 
 

http://git-wip-us.apache.org/repos/asf/struts/blob/1dc545e3/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 30ebfa8..6f6ea8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,8 +89,8 @@
 3.0.13
 3.3
 5.0.2
-2.0.6
-2.2
+2.2.2
+2.3
 
 
 
${project.build.directory}/site
@@ -641,6 +641,13 @@
 
 
 
+javax.el
+el-api
+1.0
+provided
+
+
+
 taglibs
 standard
 1.1.2
@@ -668,10 +675,40 @@
 
 
 org.apache.tiles
+tiles-servlet
+${tiles.version}
+
+
+org.apache.tiles
 tiles-jsp
 ${tiles.version}
 runtime
 
+
+org.apache.tiles
+tiles-servlet-wildcard
+${tiles.version}
+
+
+org.apache.tiles
+tiles-jsp
+${tiles.version}
+
+
+org.apache.tiles
+tiles-freemarker
+${tiles.version}
+
+
+org.apache.tiles
+tiles-ognl
+${tiles.version}
+
+
+org.apache.tiles
+tiles-el
+${tiles.version}
+
 
 
 javax.servlet



[06/16] struts git commit: Adds missing header with license (cherry picked from commit 27ad6cb)

2016-01-10 Thread lukaszlenart
Adds missing header with license
(cherry picked from commit 27ad6cb)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/913944b8
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/913944b8
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/913944b8

Branch: refs/heads/support-2-3
Commit: 913944b8eee6c5565cb665b5477953be9b85152a
Parents: ddeb7f0
Author: Lukasz Lenart 
Authored: Wed Nov 25 20:54:39 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:36:22 2015 +0100

--
 .../struts2/views/tiles/PortletTilesResult.java | 21 
 .../StrutsFreeMarkerAttributeRenderer.java  | 19 ++
 .../tiles/StrutsTilesContainerFactory.java  |  2 --
 3 files changed, 40 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/913944b8/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
--
diff --git 
a/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
 
b/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
index ea134d8..3ca68fe 100644
--- 
a/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
+++ 
b/plugins/portlet-tiles/src/main/java/org/apache/struts2/views/tiles/PortletTilesResult.java
@@ -1,3 +1,24 @@
+/*
+ * $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.
+ */
+
 package org.apache.struts2.views.tiles;
 
 import com.opensymphony.xwork2.ActionInvocation;

http://git-wip-us.apache.org/repos/asf/struts/blob/913944b8/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
index e2669c7..032f7e6 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
@@ -1,3 +1,22 @@
+/*
+ * 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.tiles;
 
 import com.opensymphony.xwork2.ActionContext;

http://git-wip-us.apache.org/repos/asf/struts/blob/913944b8/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
index 4c5871d..1b01a8d 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
@@ -1,6 +1,4 @@
 /*
- * $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



[13/16] struts git commit: Cleans up and fixes issue based on feedback

2016-01-10 Thread lukaszlenart
Cleans up and fixes issue based on feedback


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9136521d
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9136521d
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9136521d

Branch: refs/heads/support-2-3
Commit: 9136521d27a45f8cd9206dc2dc4a50a2ebfa07db
Parents: 5be1590
Author: Lukasz Lenart 
Authored: Sat Dec 19 10:15:02 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Dec 19 10:15:02 2015 +0100

--
 .../tiles/StrutsTilesContainerFactory.java  | 35 
 1 file changed, 21 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/9136521d/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
index b198313..b96884c 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
@@ -27,6 +27,7 @@ import org.apache.tiles.TilesContainer;
 import org.apache.tiles.context.ChainedTilesRequestContextFactory;
 import org.apache.tiles.context.TilesRequestContext;
 import org.apache.tiles.context.TilesRequestContextFactory;
+import org.apache.tiles.definition.DefinitionsFactory;
 import org.apache.tiles.definition.DefinitionsFactoryException;
 import org.apache.tiles.definition.pattern.DefinitionPatternMatcherFactory;
 import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
@@ -59,6 +60,7 @@ import org.apache.tiles.renderer.AttributeRenderer;
 import org.apache.tiles.renderer.TypeDetectingAttributeRenderer;
 import org.apache.tiles.renderer.impl.BasicRendererFactory;
 import org.apache.tiles.renderer.impl.ChainedDelegateAttributeRenderer;
+import org.apache.tiles.servlet.context.ServletUtil;
 import org.apache.tiles.util.URLUtil;
 
 import javax.el.ArrayELResolver;
@@ -68,9 +70,9 @@ import javax.el.ELResolver;
 import javax.el.ListELResolver;
 import javax.el.MapELResolver;
 import javax.el.ResourceBundleELResolver;
+import javax.servlet.ServletContext;
 import java.io.IOException;
 import java.net.URL;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -98,9 +100,17 @@ public class StrutsTilesContainerFactory extends 
BasicTilesContainerFactory {
 public static final String PATTERN_WILDCARD = "WILDCARD";
 public static final String PATTERN_REGEXP = "REGEXP";
 
+/**
+ * Default pattern to be used to collect Tiles definitions if user didn't 
configure any
+ */
+public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
+
 @Override
 protected BasicTilesContainer instantiateContainer(TilesApplicationContext 
applicationContext) {
-return new CachingTilesContainer();
+CachingTilesContainer tilesContainer = new CachingTilesContainer();
+ServletContext servletContext = (ServletContext) 
applicationContext.getContext();
+ServletUtil.setContainer(servletContext, tilesContainer);
+return tilesContainer;
 }
 
 @Override
@@ -189,19 +199,9 @@ public class StrutsTilesContainerFactory extends 
BasicTilesContainerFactory {
 }
 
 @Override
-protected List getSourceURLs(TilesApplicationContext 
applicationContext,
-  TilesRequestContextFactory 
contextFactory) {
+protected List getSourceURLs(TilesApplicationContext 
applicationContext, TilesRequestContextFactory contextFactory) {
 try {
-Set finalSet = new HashSet();
-Set webINFSet = 
applicationContext.getResources("/WEB-INF/**/tiles*.xml");
-Set metaINFSet = 
applicationContext.getResources("classpath*:META-INF/**/tiles*.xml");
-
-if (webINFSet != null) {
-finalSet.addAll(webINFSet);
-}
-if (metaINFSet != null) {
-finalSet.addAll(metaINFSet);
-}
+Set finalSet = 
applicationContext.getResources(getTilesDefinitionPattern(applicationContext.getInitParams()));
 
 return URLUtil.getBaseTilesDefinitionURLs(finalSet);
 } catch (IOException e) {
@@ -209,6 +209,13 @@ public class StrutsTilesContainerFactory extends 
BasicTilesContainerFactory {
 }
 }
 
+protected String getTilesDefinitionPattern(Map params) {
+if (params.containsKey(DefinitionsFactory.DEFINITIONS_CONFIG)) {
+return params.get(DefinitionsFactory.DEFINITIONS_CONFIG);
+}
+return TILES_DEFAULT_

[11/16] struts git commit: Implements ApplicationContext which supports wildcards

2016-01-10 Thread lukaszlenart
Implements ApplicationContext which supports wildcards


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f721d549
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f721d549
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f721d549

Branch: refs/heads/support-2-3
Commit: f721d5490cfc1ed9f1a441ea90de82e31bb32351
Parents: db318c2
Author: Lukasz Lenart 
Authored: Sat Dec 19 10:13:57 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Dec 19 10:13:57 2015 +0100

--
 ...sWildcardServletTilesApplicationContext.java | 75 
 1 file changed, 75 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/f721d549/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
new file mode 100644
index 000..9482259
--- /dev/null
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
@@ -0,0 +1,75 @@
+package org.apache.struts2.tiles;
+
+import com.opensymphony.xwork2.config.ConfigurationException;
+import com.opensymphony.xwork2.util.WildcardUtil;
+import com.opensymphony.xwork2.util.finder.ResourceFinder;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
+
+import javax.servlet.ServletContext;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+public class StrutsWildcardServletTilesApplicationContext extends 
ServletTilesApplicationContext {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(StrutsWildcardServletTilesApplicationContext.class);
+
+private ResourceFinder finder;
+
+public StrutsWildcardServletTilesApplicationContext(ServletContext 
context) {
+super(context);
+
+Set urls = new HashSet();
+for (Object path : context.getResourcePaths("/")) {
+try {
+URL url = new 
File(context.getRealPath(String.valueOf(path))).toURI().toURL();
+urls.add(url);
+} catch (MalformedURLException e) {
+throw new ConfigurationException(e);
+}
+}
+
+finder = new ResourceFinder(urls.toArray(new URL[urls.size()]));
+}
+
+public Set getResources(String path) throws IOException {
+Set resources = new HashSet();
+
+if (path.startsWith("/")) {
+LOG.trace("Using ServletContext to load resource #0", path);
+URL resource = getResource(path);
+if (resource != null) {
+resources.add(resource);
+}
+}
+resources.addAll(findResources(path));
+
+return resources;
+}
+
+protected Set findResources(String path) throws IOException {
+Set resources = new HashSet();
+
+LOG.trace("Using ResourceFinder to find matches for #0", path);
+
+Pattern pattern = WildcardUtil.compileWildcardPattern(path);
+Map matches = finder.getResourcesMap("");
+
+for (String resource : matches.keySet()) {
+if (pattern.matcher(resource).matches()) {
+resources.add(matches.get(resource));
+}
+}
+
+LOG.trace("Found resources #0 for path #1", resources, path);
+return resources;
+}
+
+}



[15/16] struts git commit: Adds fetching resources from classpath

2016-01-10 Thread lukaszlenart
Adds fetching resources from classpath


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5ed7b365
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5ed7b365
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5ed7b365

Branch: refs/heads/support-2-3
Commit: 5ed7b3656769fab4198e2eedf32eac1787e370b5
Parents: 2d70ea2
Author: Lukasz Lenart 
Authored: Sun Dec 27 15:17:28 2015 +0100
Committer: Lukasz Lenart 
Committed: Sun Dec 27 15:17:28 2015 +0100

--
 .../StrutsWildcardServletTilesApplicationContext.java   | 12 
 1 file changed, 12 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/5ed7b365/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
index 8aa34fe..f01b45a 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
@@ -31,6 +31,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -46,6 +47,7 @@ public class StrutsWildcardServletTilesApplicationContext 
extends ServletTilesAp
 super(context);
 
 Set urls = new HashSet();
+
 for (Object path : context.getResourcePaths("/")) {
 try {
 URL url = new 
File(context.getRealPath(String.valueOf(path))).toURI().toURL();
@@ -55,6 +57,16 @@ public class StrutsWildcardServletTilesApplicationContext 
extends ServletTilesAp
 }
 }
 
+try {
+Enumeration resources = 
getClass().getClassLoader().getResources("/");
+while (resources.hasMoreElements()) {
+URL resource = resources.nextElement();
+urls.add(resource);
+}
+} catch (IOException e) {
+throw new ConfigurationException(e);
+}
+
 finder = new ResourceFinder(urls.toArray(new URL[urls.size()]));
 }
 



[09/16] struts git commit: Reverts back to XWork logging layer

2016-01-10 Thread lukaszlenart
Reverts back to XWork logging layer


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/696e5662
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/696e5662
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/696e5662

Branch: refs/heads/support-2-3
Commit: 696e5662797d1958bdc7d6ca2345bc0538b022a6
Parents: 27aa7e1
Author: Lukasz Lenart 
Authored: Sat Nov 28 15:57:52 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:57:52 2015 +0100

--
 .../tiles/StrutsFreeMarkerAttributeRenderer.java  |  6 +++---
 .../struts2/tiles/StrutsTilesContainerFactory.java| 14 +++---
 .../apache/struts2/tiles/StrutsTilesInitializer.java  |  6 +++---
 .../org/apache/struts2/tiles/StrutsTilesListener.java |  4 ++--
 4 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/696e5662/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
index 849053a..c9491b4 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
@@ -23,11 +23,11 @@ import com.opensymphony.xwork2.ActionContext;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.config.ConfigurationException;
 import com.opensymphony.xwork2.inject.Container;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import freemarker.ext.beans.BeanModel;
 import freemarker.template.Configuration;
 import freemarker.template.TemplateException;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.views.JspSupportServlet;
 import org.apache.struts2.views.freemarker.FreemarkerManager;
@@ -47,7 +47,7 @@ import java.io.IOException;
 
 public class StrutsFreeMarkerAttributeRenderer extends 
AbstractTypeDetectingAttributeRenderer {
 
-private static Logger LOG = 
LogManager.getLogger(StrutsFreeMarkerAttributeRenderer.class);
+private static Logger LOG = 
LoggerFactory.getLogger(StrutsFreeMarkerAttributeRenderer.class);
 
 @Override
 public void write(Object value, Attribute attribute, TilesRequestContext 
request) throws IOException {

http://git-wip-us.apache.org/repos/asf/struts/blob/696e5662/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
index 1b01a8d..b198313 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
@@ -181,7 +181,7 @@ public class StrutsTilesContainerFactory extends 
BasicTilesContainerFactory {
 DefinitionPatternMatcherFactory wildcardFactory = new 
WildcardDefinitionPatternMatcherFactory();
 DefinitionPatternMatcherFactory regexpFactory = new 
RegexpDefinitionPatternMatcherFactory();
 
-PrefixedPatternDefinitionResolver resolver = new 
PrefixedPatternDefinitionResolver<>();
+PrefixedPatternDefinitionResolver resolver = new 
PrefixedPatternDefinitionResolver();
 resolver.registerDefinitionPatternMatcherFactory(PATTERN_WILDCARD, 
wildcardFactory);
 resolver.registerDefinitionPatternMatcherFactory(PATTERN_REGEXP, 
regexpFactory);
 
@@ -192,7 +192,7 @@ public class StrutsTilesContainerFactory extends 
BasicTilesContainerFactory {
 protected List getSourceURLs(TilesApplicationContext 
applicationContext,
   TilesRequestContextFactory 
contextFactory) {
 try {
-Set finalSet = new HashSet<>();
+Set finalSet = new HashSet();
 Set webINFSet = 
applicationContext.getResources("/WEB-INF/**/tiles*.xml");
 Set metaINFSet = 
applicationContext.getResources("classpath*:META-INF/**/tiles*.xml");
 
@@ -239,24 +239,24 @@ public class StrutsTilesContainerFactory extends 
BasicTilesContainerFactory {
 PropertyAccessor objectPropertyAccessor = 
OgnlRuntime.getPropertyAccessor(Object.class);
 PropertyAccessor mapPropertyAccessor = 
OgnlRuntime.getPrope

[08/16] struts git commit: Fixes dependency clash

2016-01-10 Thread lukaszlenart
Fixes dependency clash

(cherry picked from commit 6622fab25bee1dae9085cca56b87711f3197916d)

Conflicts:
apps/showcase/pom.xml
plugins/bean-validation/pom.xml


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/27aa7e1e
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/27aa7e1e
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/27aa7e1e

Branch: refs/heads/support-2-3
Commit: 27aa7e1e27546effcfc1e4214d231b4a31263fb5
Parents: f19e4be
Author: Lukasz Lenart 
Authored: Sat Nov 28 15:39:47 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:39:47 2015 +0100

--
 plugins/tiles/pom.xml | 7 +++
 pom.xml   | 7 +++
 2 files changed, 6 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/27aa7e1e/plugins/tiles/pom.xml
--
diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index 6e872ee..2642b07 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -73,11 +73,10 @@
 provided
 
 
-javax.el
-el-api
-provided
+org.glassfish
+javax.el
+true
 
-
 
 
UTF-8

http://git-wip-us.apache.org/repos/asf/struts/blob/27aa7e1e/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 7f45aea..f6b5ada 100644
--- a/pom.xml
+++ b/pom.xml
@@ -641,10 +641,9 @@
 
 
 
-javax.el
-el-api
-1.0
-provided
+org.glassfish
+javax.el
+3.0.0
 
 
 



[02/16] struts git commit: Re-implements tiles integration based on new API (cherry picked from commit 70716e9)

2016-01-10 Thread lukaszlenart
Re-implements tiles integration based on new API
(cherry picked from commit 70716e9)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9862580b
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9862580b
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9862580b

Branch: refs/heads/support-2-3
Commit: 9862580bbee704cff63b917f3dfda62d21c1bad5
Parents: 1dc545e
Author: Lukasz Lenart 
Authored: Wed Nov 25 20:29:18 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:35:48 2015 +0100

--
 .../StrutsFreeMarkerAttributeRenderer.java  |  72 +
 .../tiles/StrutsTilesContainerFactory.java  | 266 +++
 .../struts2/tiles/StrutsTilesInitializer.java   |  47 
 .../struts2/tiles/StrutsTilesListener.java  |  58 +---
 4 files changed, 351 insertions(+), 92 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/9862580b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
new file mode 100644
index 000..e2669c7
--- /dev/null
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsFreeMarkerAttributeRenderer.java
@@ -0,0 +1,72 @@
+package org.apache.struts2.tiles;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.config.ConfigurationException;
+import com.opensymphony.xwork2.inject.Container;
+import freemarker.template.TemplateException;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.views.freemarker.FreemarkerResult;
+import org.apache.tiles.Attribute;
+import org.apache.tiles.context.TilesRequestContext;
+import org.apache.tiles.impl.InvalidTemplateException;
+import org.apache.tiles.renderer.impl.AbstractTypeDetectingAttributeRenderer;
+import org.apache.tiles.servlet.context.ServletTilesRequestContext;
+import org.apache.tiles.servlet.context.ServletUtil;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+public class StrutsFreeMarkerAttributeRenderer extends 
AbstractTypeDetectingAttributeRenderer {
+
+private static Logger LOG = 
LogManager.getLogger(StrutsFreeMarkerAttributeRenderer.class);
+
+@Override
+public void write(Object value, Attribute attribute, TilesRequestContext 
request) throws IOException {
+if (value != null) {
+if (value instanceof String) {
+LOG.trace("Rendering freemarker tile ...");
+
+ServletTilesRequestContext servletRequest = 
ServletUtil.getServletRequest(request);
+HttpServletRequest httpRequest = servletRequest.getRequest();
+
+ActionContext ctx = 
ServletActionContext.getActionContext(httpRequest);
+if (ctx == null) {
+throw new ConfigurationException("There is no 
ActionContext for current request!");
+}
+ActionInvocation invocation = ctx.getActionInvocation();
+
+String include = (String) value;
+FreemarkerResult result = new FreemarkerResult(include);
+result.setWriter(request.getWriter());
+
+Container container = ctx.getContainer();
+container.inject(result);
+
+try {
+result.doExecute(include, invocation);
+} catch (TemplateException e) {
+LOG.error("Exception was thrown during rendering value {}: 
{}", value, e.getMessage());
+throw new InvalidTemplateException(e);
+}
+} else {
+LOG.error("Value {} is not a String, cannot render template!", 
value);
+throw new InvalidTemplateException("Cannot render a template 
that is not a string: " + String.valueOf(value));
+}
+} else {
+LOG.error("Value is null, cannot render template!");
+throw new InvalidTemplateException("Cannot render a null 
template");
+}
+}
+
+public boolean isRenderable(Object value, Attribute attribute, 
TilesRequestContext request) {
+if (value instanceof String) {
+String string = (String) value;
+return string.startsWith("/") && string.endsWith(".ftl");
+}
+return false;
+}
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/9862580b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesCo

[10/16] struts git commit: Drops duplicated and unused dependencies

2016-01-10 Thread lukaszlenart
Drops duplicated and unused dependencies


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/db318c21
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/db318c21
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/db318c21

Branch: refs/heads/support-2-3
Commit: db318c2116f74559a22c6854ea6aeaeca36dd298
Parents: 696e566
Author: Lukasz Lenart 
Authored: Sat Dec 19 10:13:10 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Dec 19 10:13:10 2015 +0100

--
 plugins/tiles/pom.xml | 13 -
 pom.xml   | 10 --
 2 files changed, 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/db318c21/plugins/tiles/pom.xml
--
diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index 2642b07..4f9d440 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -49,14 +49,6 @@
 
 
 org.apache.tiles
-tiles-servlet-wildcard
-
-
-org.apache.tiles
-tiles-jsp
-
-
-org.apache.tiles
 tiles-freemarker
 
 
@@ -68,11 +60,6 @@
 tiles-el
 
 
-javax.servlet
-jsp-api
-provided
-
-
 org.glassfish
 javax.el
 true

http://git-wip-us.apache.org/repos/asf/struts/blob/db318c21/pom.xml
--
diff --git a/pom.xml b/pom.xml
index f6b5ada..afa95f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -690,16 +690,6 @@
 
 
 org.apache.tiles
-tiles-servlet-wildcard
-${tiles.version}
-
-
-org.apache.tiles
-tiles-jsp
-${tiles.version}
-
-
-org.apache.tiles
 tiles-freemarker
 ${tiles.version}
 



[14/16] struts git commit: Adds missing header with license

2016-01-10 Thread lukaszlenart
Adds missing header with license


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/2d70ea2f
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/2d70ea2f
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/2d70ea2f

Branch: refs/heads/support-2-3
Commit: 2d70ea2f7d09d75fd8810772b7872b8dd64a1ca2
Parents: 9136521
Author: Lukasz Lenart 
Authored: Sat Dec 19 10:23:39 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Dec 19 10:23:39 2015 +0100

--
 ...tsWildcardServletTilesApplicationContext.java | 19 +++
 1 file changed, 19 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/2d70ea2f/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
index 9482259..8aa34fe 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
@@ -1,3 +1,22 @@
+/*
+ * 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.tiles;
 
 import com.opensymphony.xwork2.config.ConfigurationException;



[04/16] struts git commit: Replaces call to deprecated api (cherry picked from commit 26f153d)

2016-01-10 Thread lukaszlenart
Replaces call to deprecated api
(cherry picked from commit 26f153d)


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5d30eb1a
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5d30eb1a
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5d30eb1a

Branch: refs/heads/support-2-3
Commit: 5d30eb1ad21d369a5e5e844363f3ec1e0e93d03a
Parents: efcea81
Author: Lukasz Lenart 
Authored: Wed Nov 25 20:29:43 2015 +0100
Committer: Lukasz Lenart 
Committed: Sat Nov 28 15:36:11 2015 +0100

--
 .../main/java/org/apache/struts2/views/tiles/TilesResult.java  | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/5d30eb1a/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
--
diff --git 
a/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java 
b/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
index 6135302..1e62672 100644
--- 
a/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
+++ 
b/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
@@ -28,9 +28,9 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.dispatcher.ServletDispatcherResult;
 import org.apache.tiles.TilesContainer;
-import org.apache.tiles.access.TilesAccess;
 
 import com.opensymphony.xwork2.ActionInvocation;
+import org.apache.tiles.servlet.context.ServletUtil;
 
 /**
  * 
@@ -84,6 +84,7 @@ public class TilesResult extends ServletDispatcherResult {
 public TilesResult(String location) {
 super(location);
 }
+
 /**
  * Dispatches to the given location. Does its forward via a 
RequestDispatcher. If the
  * dispatch fails a 404 error will be sent back in the http response.
@@ -97,7 +98,8 @@ public class TilesResult extends ServletDispatcherResult {
 setLocation(location);
 
 ServletContext servletContext = 
ServletActionContext.getServletContext();
-TilesContainer container = TilesAccess.getContainer(servletContext);
+
+TilesContainer container = ServletUtil.getContainer(servletContext);
 
 HttpServletRequest request = ServletActionContext.getRequest();
 HttpServletResponse response = ServletActionContext.getResponse();



struts git commit: Solves issue with warning abut Custom EL

2016-01-10 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/support-2-3 997966829 -> c6750c110


Solves issue with warning abut Custom EL


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/c6750c11
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c6750c11
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c6750c11

Branch: refs/heads/support-2-3
Commit: c6750c110ca07719ef2b3d706b927e3195ff01c8
Parents: 9979668
Author: Lukasz Lenart 
Authored: Sun Jan 10 16:05:20 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 16:05:20 2016 +0100

--
 .../java/org/apache/struts2/views/freemarker/FreemarkerManager.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/c6750c11/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java 
b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
index a99235e..8285821 100644
--- 
a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
+++ 
b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
@@ -365,6 +365,7 @@ public class FreemarkerManager {
 servletContext.setAttribute(ATTR_APPLICATION_MODEL, 
servletContextModel);
 }
 TaglibFactory taglibs = new TaglibFactory(servletContext);
+taglibs.setObjectWrapper(wrapper);
 servletContext.setAttribute(ATTR_JSP_TAGLIBS_MODEL, taglibs);
 }
 model.put(KEY_APPLICATION, servletContextModel);



[1/2] struts-examples git commit: Cleans up excludes

2016-01-10 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master ff1b0b18f -> f492088b2


Cleans up excludes


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/8c261e61
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/8c261e61
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/8c261e61

Branch: refs/heads/master
Commit: 8c261e61af62d6a9d30eec879d26c70a88da082d
Parents: ff1b0b1
Author: Lukasz Lenart 
Authored: Sun Jan 10 16:23:30 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 16:23:30 2016 +0100

--
 .gitignore | 51 ---
 1 file changed, 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/8c261e61/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 313053b..f188d98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,55 +16,4 @@
 *.sh
 
 # Maven
-core/target
-xwork-core/target
-archetypes/struts2-archetype-angularjs/target
-archetypes/struts2-archetype-blank/target
-archetypes/struts2-archetype-convention/target
-archetypes/struts2-archetype-dbportlet/target
-archetypes/struts2-archetype-plugin/target
-archetypes/struts2-archetype-portlet/target
-archetypes/struts2-archetype-starter/target
-archetypes/target
-plugins/convention/target
-plugins/embeddedjsp/target
-plugins/dojo/target
-plugins/osgi/target
-plugins/cdi/target
-plugins/codebehind/target
-plugins/spring/target
-plugins/jfreechart/target
-apps/rest-showcase/target
-apps/mailreader/target
-apps/portlet/target
-apps/blank/target
-apps/jboss-blank/target
-apps/mailreader/target
-apps/portlet/target
-apps/showcase/target
-apps/target
-bundles/admin/target
-plugins/config-browser/target
-plugins/jasperreports/target
-plugins/jsf/target
-plugins/json/target
-plugins/portlet-tiles/target
-plugins/portlet/target
-plugins/sitegraph/target
-plugins/sitemesh/target
-plugins/struts1/target
-plugins/tiles3/target
-plugins/javatemplates/target
-bundles/demo/target
-plugins/rest/target
-plugins/plexus/target
-plugins/testng/target
-plugins/dwr/target
-plugins/gxp/target
-plugins/oval/target
-plugins/junit/target
-plugins/tiles/target
-bundles/target
-plugins/target
 target
-plugins/testng/test-output
\ No newline at end of file



[2/2] struts-examples git commit: Adds tiles example

2016-01-10 Thread lukaszlenart
Adds tiles example


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/f492088b
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/f492088b
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/f492088b

Branch: refs/heads/master
Commit: f492088b236dbb4a666174072e51ac8acd8050f8
Parents: 8c261e6
Author: Lukasz Lenart 
Authored: Sun Jan 10 16:23:42 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 16:23:42 2016 +0100

--
 pom.xml | 3 ++-
 tiles   | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/f492088b/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 7e803d3..1262400 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
 4.0.0
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 pom
 Struts 2 Examples
@@ -68,6 +68,7 @@
 restful2actionmapper
 rest-angular
 spring-struts
+tiles
 themes
 themes-override
 using-tags

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/f492088b/tiles
--
diff --git a/tiles b/tiles
new file mode 16
index 000..dc52bc8
--- /dev/null
+++ b/tiles
@@ -0,0 +1 @@
+Subproject commit dc52bc82895dc664ff0db0bb8ca330a13e48c169



[2/2] struts-examples git commit: Drops wrong version definition

2016-01-10 Thread lukaszlenart
Drops wrong version definition


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/4e28aaab
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/4e28aaab
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/4e28aaab

Branch: refs/heads/master
Commit: 4e28aaab8f3a9b0461c40faa83c121a966d1f4f8
Parents: 29c600a
Author: Lukasz Lenart 
Authored: Sun Jan 10 16:35:01 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 16:35:01 2016 +0100

--
 rest-angular/pom.xml | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/4e28aaab/rest-angular/pom.xml
--
diff --git a/rest-angular/pom.xml b/rest-angular/pom.xml
index a704eb8..bfe1107 100644
--- a/rest-angular/pom.xml
+++ b/rest-angular/pom.xml
@@ -23,7 +23,6 @@
 
 org.apache.struts
 struts2-core
-${struts2.version}
 
 
 asm
@@ -98,7 +97,6 @@
 
 org.apache.logging.log4j
 log4j-core
-${log4j2.version}
 
 
 



[1/2] struts-examples git commit: Cleans up poms

2016-01-10 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master f492088b2 -> 4e28aaab8


Cleans up poms


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/29c600a1
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/29c600a1
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/29c600a1

Branch: refs/heads/master
Commit: 29c600a16abe2b060aa106478e159d35f11d10db
Parents: f492088
Author: Lukasz Lenart 
Authored: Sun Jan 10 16:29:39 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 16:29:39 2016 +0100

--
 annotations/pom.xml   | 2 +-
 basic-struts/pom.xml  | 2 +-
 bean-validation/pom.xml   | 2 +-
 blank/pom.xml | 2 +-
 coding-actions/pom.xml| 2 +-
 control-tags/pom.xml  | 2 +-
 debugging-struts/pom.xml  | 2 +-
 exception-handling/pom.xml| 2 +-
 exclude-parameters/pom.xml| 2 +-
 form-processing/pom.xml   | 2 +-
 form-tags/pom.xml | 2 +-
 form-validation/pom.xml   | 2 +-
 form-xml-validation/pom.xml   | 2 +-
 helloworld/pom.xml| 2 +-
 http-session/pom.xml  | 2 +-
 interceptors/pom.xml  | 2 +-
 jboss-blank/pom.xml   | 2 +-
 mailreader/pom.xml| 4 ++--
 message-resource/pom.xml  | 2 +-
 preparable-interface/pom.xml  | 2 +-
 rest-angular/pom.xml  | 2 +-
 restful2actionmapper/pom.xml  | 2 +-
 spring-struts/pom.xml | 2 +-
 themes-override/pom.xml   | 2 +-
 themes/pom.xml| 2 +-
 unit-testing/pom.xml  | 2 +-
 using-tags/pom.xml| 2 +-
 wildcard-method-selection/pom.xml | 2 +-
 28 files changed, 29 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/annotations/pom.xml
--
diff --git a/annotations/pom.xml b/annotations/pom.xml
index 4e238b5..8a4fe34 100644
--- a/annotations/pom.xml
+++ b/annotations/pom.xml
@@ -5,7 +5,7 @@
 4.0.0
 
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/basic-struts/pom.xml
--
diff --git a/basic-struts/pom.xml b/basic-struts/pom.xml
index 9ed1c09..18b8a9a 100644
--- a/basic-struts/pom.xml
+++ b/basic-struts/pom.xml
@@ -5,7 +5,7 @@
 4.0.0
 
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 
 basic-struts

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/bean-validation/pom.xml
--
diff --git a/bean-validation/pom.xml b/bean-validation/pom.xml
index 33d56b7..5c3dd16 100755
--- a/bean-validation/pom.xml
+++ b/bean-validation/pom.xml
@@ -3,7 +3,7 @@
 4.0.0
 
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 
 bean-validation

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/blank/pom.xml
--
diff --git a/blank/pom.xml b/blank/pom.xml
index 74a435f..aa18b4c 100644
--- a/blank/pom.xml
+++ b/blank/pom.xml
@@ -25,7 +25,7 @@
 4.0.0
 
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/coding-actions/pom.xml
--
diff --git a/coding-actions/pom.xml b/coding-actions/pom.xml
index 207f77d..34bdad4 100644
--- a/coding-actions/pom.xml
+++ b/coding-actions/pom.xml
@@ -5,7 +5,7 @@
 4.0.0
 
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/control-tags/pom.xml
--
diff --git a/control-tags/pom.xml b/control-tags/pom.xml
index 6eaf08e..6bddd5e 100755
--- a/control-tags/pom.xml
+++ b/control-tags/pom.xml
@@ -5,7 +5,7 @@
 4.0.0
 
 struts.apache.org
-struts2examples
+struts-examples
 1.0.0
 
 control-tags

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/29c600a1/debugging-struts/pom.xml
--
diff --git a/debugging-struts/pom.xml b/debugging-struts/pom.xml
index 3e027e8..9f0c0d7 100644
--- a/debugging-struts/pom.xml
+++ b/debugging-struts/pom.xml
@@ -4,7 +4,7 @@

struts-examples git commit: Removes tiles to fix issue with index

2016-01-10 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 4e28aaab8 -> cc504067f


Removes tiles to fix issue with index


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/cc504067
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/cc504067
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/cc504067

Branch: refs/heads/master
Commit: cc504067f3ae5110f2f40df66bbcac6fb42a1b37
Parents: 4e28aaa
Author: Lukasz Lenart 
Authored: Sun Jan 10 16:38:24 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 16:38:24 2016 +0100

--
 tiles | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/cc504067/tiles
--
diff --git a/tiles b/tiles
deleted file mode 16
index dc52bc8..000
--- a/tiles
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit dc52bc82895dc664ff0db0bb8ca330a13e48c169



[2/3] struts-examples git commit: Uses proper groupId

2016-01-10 Thread lukaszlenart
Uses proper groupId


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/6679a72b
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/6679a72b
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/6679a72b

Branch: refs/heads/master
Commit: 6679a72b470d1e5454ad1ae02b00f3ecdf77df56
Parents: 48c275a
Author: Lukasz Lenart 
Authored: Sun Jan 10 18:00:10 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 18:00:10 2016 +0100

--
 themes/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/6679a72b/themes/pom.xml
--
diff --git a/themes/pom.xml b/themes/pom.xml
index 7566613..0cab23b 100644
--- a/themes/pom.xml
+++ b/themes/pom.xml
@@ -4,7 +4,7 @@
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 4.0.0
 
-struts.apache.org
+org.apache.struts
 struts-examples
 1.0.0
 



[3/3] struts-examples git commit: Adds tiles example

2016-01-10 Thread lukaszlenart
Adds tiles example


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/16108fa0
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/16108fa0
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/16108fa0

Branch: refs/heads/master
Commit: 16108fa0db21ced2fd94e077a68763c95e19d5f2
Parents: 6679a72
Author: Lukasz Lenart 
Authored: Sun Jan 10 18:00:24 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 18:00:24 2016 +0100

--
 tiles/README.md |  12 +++
 .../java/org/demo/example/ExampleSupport.java   |  30 ++
 .../main/java/org/demo/example/HelloWorld.java  |  61 
 tiles/src/main/java/org/demo/example/Login.java |  59 +++
 tiles/src/main/resources/example.xml|  44 +
 tiles/src/main/resources/log4j.properties   |  55 +++
 .../org/demo/example/Login-validation.xml   |  17 
 .../org/demo/example/package.properties |   5 +
 .../org/demo/example/package_es.properties  |   5 +
 tiles/src/main/resources/struts.xml |  12 +++
 .../src/main/webapp/WEB-INF/lib/test-plugin.jar | Bin 0 -> 2988 bytes
 tiles/src/main/webapp/WEB-INF/tiles-2.xml   |  19 
 .../main/webapp/WEB-INF/tiles-ftl-layout.xml|  22 +
 tiles/src/main/webapp/WEB-INF/tiles.xml |  22 +
 tiles/src/main/webapp/WEB-INF/web.xml   |  35 +++
 tiles/src/main/webapp/example/HelloWorld.ftl|  19 
 tiles/src/main/webapp/example/HelloWorld.jsp|  22 +
 tiles/src/main/webapp/example/Login.jsp |  15 +++
 tiles/src/main/webapp/example/Menu.jsp  |   3 +
 tiles/src/main/webapp/example/Missing.jsp   |  11 +++
 tiles/src/main/webapp/example/Register.jsp  |   3 +
 tiles/src/main/webapp/example/Welcome.jsp   |  18 
 tiles/src/main/webapp/index.html|  10 ++
 tiles/src/main/webapp/tiles/footer.ftl  |  11 +++
 tiles/src/main/webapp/tiles/header.jsp  |   1 +
 tiles/src/main/webapp/tiles/layout.ftl  |  38 
 tiles/src/main/webapp/tiles/layout.jsp  |  35 +++
 tiles/src/main/webapp/tiles/menu.jsp|   3 +
 .../test/java/org/demo/example/ConfigTest.java  |  97 +++
 .../java/org/demo/example/HelloWorldTest.java   |  37 +++
 .../test/java/org/demo/example/LoginTest.java   |  55 +++
 31 files changed, 776 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/16108fa0/tiles/README.md
--
diff --git a/tiles/README.md b/tiles/README.md
new file mode 100644
index 000..e954859
--- /dev/null
+++ b/tiles/README.md
@@ -0,0 +1,12 @@
+Struts2 Tiles demo
+==
+
+[![Build 
Status](https://travis-ci.org/lukaszlenart/struts2-tiles-demo.png?branch=master)](https://travis-ci.org/lukaszlenart/struts2-tiles-demo)
+
+Simple Struts2 project with Tiles
+
+Published under [Apache License 
2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
+
+
+[![Bitdeli 
Badge](https://d2weczhvl823v0.cloudfront.net/lukaszlenart/struts2-tiles-demo/trend.png)](https://bitdeli.com/free
 "Bitdeli Badge")
+

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/16108fa0/tiles/src/main/java/org/demo/example/ExampleSupport.java
--
diff --git a/tiles/src/main/java/org/demo/example/ExampleSupport.java 
b/tiles/src/main/java/org/demo/example/ExampleSupport.java
new file mode 100644
index 000..24f0d48
--- /dev/null
+++ b/tiles/src/main/java/org/demo/example/ExampleSupport.java
@@ -0,0 +1,30 @@
+/*
+ * $Id: ExampleSupport.java 739661 2009-02-01 00:06:00Z davenewton $
+ *
+ * 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.demo.example;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+/**
+ * Base Action class for the Tutorial package.
+ */
+public class ExampleSupport extends ActionSupport {
+}

http://git-wip-us.apache.org/rep

[1/3] struts-examples git commit: Uses proper groupId

2016-01-10 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master cc504067f -> 16108fa0d


Uses proper groupId


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/48c275aa
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/48c275aa
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/48c275aa

Branch: refs/heads/master
Commit: 48c275aa3ce8069c501a94b3697e0553c7188ace
Parents: cc50406
Author: Lukasz Lenart 
Authored: Sun Jan 10 17:59:29 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 17:59:29 2016 +0100

--
 annotations/pom.xml   |   2 +-
 basic-struts/pom.xml  |   2 +-
 bean-validation/pom.xml   |   2 +-
 blank/pom.xml |   2 +-
 coding-actions/pom.xml|   2 +-
 control-tags/pom.xml  |   2 +-
 debugging-struts/pom.xml  |   2 +-
 exception-handling/pom.xml|   2 +-
 exclude-parameters/pom.xml|   2 +-
 form-processing/pom.xml   |   2 +-
 form-tags/pom.xml |   2 +-
 form-validation/pom.xml   |   2 +-
 form-xml-validation/pom.xml   |   2 +-
 helloworld/pom.xml|   2 +-
 http-session/pom.xml  |   2 +-
 interceptors/pom.xml  |   2 +-
 jboss-blank/pom.xml   |   2 +-
 mailreader/pom.xml|   2 +-
 message-resource/pom.xml  |   2 +-
 pom.xml   |   2 +-
 preparable-interface/pom.xml  |   2 +-
 rest-angular/pom.xml  |   2 +-
 restful2actionmapper/pom.xml  |   2 +-
 spring-struts/pom.xml |   2 +-
 themes-override/pom.xml   |   2 +-
 tiles/pom.xml | 108 +
 unit-testing/pom.xml  |   2 +-
 using-tags/pom.xml|   2 +-
 wildcard-method-selection/pom.xml |   2 +-
 29 files changed, 136 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/48c275aa/annotations/pom.xml
--
diff --git a/annotations/pom.xml b/annotations/pom.xml
index 8a4fe34..651dc5c 100644
--- a/annotations/pom.xml
+++ b/annotations/pom.xml
@@ -4,7 +4,7 @@
 xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 4.0.0
 
-struts.apache.org
+org.apache.struts
 struts-examples
 1.0.0
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/48c275aa/basic-struts/pom.xml
--
diff --git a/basic-struts/pom.xml b/basic-struts/pom.xml
index 18b8a9a..8743cf3 100644
--- a/basic-struts/pom.xml
+++ b/basic-struts/pom.xml
@@ -4,7 +4,7 @@
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 4.0.0
 
-struts.apache.org
+org.apache.struts
 struts-examples
 1.0.0
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/48c275aa/bean-validation/pom.xml
--
diff --git a/bean-validation/pom.xml b/bean-validation/pom.xml
index 5c3dd16..2a5b494 100755
--- a/bean-validation/pom.xml
+++ b/bean-validation/pom.xml
@@ -2,7 +2,7 @@
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 4.0.0
 
-struts.apache.org
+org.apache.struts
 struts-examples
 1.0.0
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/48c275aa/blank/pom.xml
--
diff --git a/blank/pom.xml b/blank/pom.xml
index aa18b4c..2cd237b 100644
--- a/blank/pom.xml
+++ b/blank/pom.xml
@@ -24,7 +24,7 @@
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 4.0.0
 
-struts.apache.org
+org.apache.struts
 struts-examples
 1.0.0
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/48c275aa/coding-actions/pom.xml
--
diff --git a/coding-actions/pom.xml b/coding-actions/pom.xml
index 34bdad4..098ce98 100644
--- a/coding-actions/pom.xml
+++ b/coding-actions/pom.xml
@@ -4,7 +4,7 @@
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 4.0.0
 
-struts.apache.org
+org.apache.struts
 struts-examples
 1.0.0
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/48c275aa/control-tags/pom.xml
-

[2/3] struts-examples git commit: Fixes issue with JavaDocs

2016-01-10 Thread lukaszlenart
Fixes issue with JavaDocs


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/b2fd3306
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/b2fd3306
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/b2fd3306

Branch: refs/heads/master
Commit: b2fd3306c75be95d7dfb5f817e2caaf004ab6f20
Parents: a591046
Author: Lukasz Lenart 
Authored: Sun Jan 10 18:24:57 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 18:24:57 2016 +0100

--
 pom.xml | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/b2fd3306/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 42db995..8196932 100644
--- a/pom.xml
+++ b/pom.xml
@@ -104,6 +104,13 @@
 1.8
 
 
+
+org.apache.maven.plugins
+maven-javadoc-plugin
+
+-Xdoclint:none
+
+
 
 
 



[3/3] struts-examples git commit: Drops unrelated tests

2016-01-10 Thread lukaszlenart
Drops unrelated tests


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/9681d33b
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/9681d33b
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/9681d33b

Branch: refs/heads/master
Commit: 9681d33b3474186ae6d53e7fb069683d608ff369
Parents: b2fd330
Author: Lukasz Lenart 
Authored: Sun Jan 10 18:29:17 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 18:29:17 2016 +0100

--
 .../test/java/org/demo/example/ConfigTest.java  | 97 
 .../java/org/demo/example/HelloWorldTest.java   | 37 
 .../test/java/org/demo/example/LoginTest.java   | 55 ---
 3 files changed, 189 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/9681d33b/tiles/src/test/java/org/demo/example/ConfigTest.java
--
diff --git a/tiles/src/test/java/org/demo/example/ConfigTest.java 
b/tiles/src/test/java/org/demo/example/ConfigTest.java
deleted file mode 100644
index c3cbceb..000
--- a/tiles/src/test/java/org/demo/example/ConfigTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * $Id: ConfigTest.java 1376638 2012-08-23 18:30:10Z jogep $
- *
- * 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.demo.example;
-
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.config.RuntimeConfiguration;
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
-
-import java.util.Map;
-import java.util.List;
-
-import org.apache.struts2.StrutsTestCase;
-
-public class ConfigTest extends StrutsTestCase {
-
-protected void assertSuccess(String result) throws Exception {
-assertTrue("Expected a success result!",
-ActionSupport.SUCCESS.equals(result));
-}
-
-protected void assertInput(String result) throws Exception {
-assertTrue("Expected an input result!",
-ActionSupport.INPUT.equals(result));
-}
-
-protected Map assertFieldErrors(ActionSupport action) throws Exception {
-assertTrue(action.hasFieldErrors());
-return action.getFieldErrors();
-}
-
-protected void assertFieldError(Map field_errors, String field_name, 
String error_message) {
-
-List errors = (List) field_errors.get(field_name);
-assertNotNull("Expected errors for " + field_name, errors);
-assertTrue("Expected errors for " + field_name, errors.size()>0);
-// TODO: Should be a loop
-assertEquals(error_message,errors.get(0));
-
-}
-
-protected void setUp() throws Exception {
-super.setUp();
-XmlConfigurationProvider c = new 
XmlConfigurationProvider("struts.xml");
-configurationManager.addContainerProvider(c);
-configurationManager.reload();
-}
-
-protected ActionConfig assertClass(String namespace, String action_name, 
String class_name) {
-RuntimeConfiguration configuration = 
configurationManager.getConfiguration().getRuntimeConfiguration();
-ActionConfig config = configuration.getActionConfig(namespace, 
action_name);
-assertNotNull("Mssing action", config);
-assertTrue("Wrong class name: [" + config.getClassName() + "]",
-class_name.equals(config.getClassName()));
-return config;
-}
-
-protected ActionConfig assertClass(String action_name, String class_name) {
-return assertClass("", action_name, class_name);
-}
-
-protected void assertResult(ActionConfig config, String result_name, 
String result_value) {
-Map results = config.getResults();
-ResultConfig result = (ResultConfig) results.get(result_name);
-Map params = result.getParams();
-String value = (String) params.get("actionName");
-if (value == null)
-value = (String) param

[1/3] struts-examples git commit: Adds missing versions

2016-01-10 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 16108fa0d -> 9681d33b3


Adds missing versions


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/a5910464
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/a5910464
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/a5910464

Branch: refs/heads/master
Commit: a5910464cd79343a7e7046759f7ac0c9fe4867a6
Parents: 16108fa
Author: Lukasz Lenart 
Authored: Sun Jan 10 18:05:11 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 18:05:11 2016 +0100

--
 rest-angular/pom.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/a5910464/rest-angular/pom.xml
--
diff --git a/rest-angular/pom.xml b/rest-angular/pom.xml
index 8770e0d..b34386c 100644
--- a/rest-angular/pom.xml
+++ b/rest-angular/pom.xml
@@ -23,6 +23,7 @@
 
 org.apache.struts
 struts2-core
+${struts2.version}
 
 
 asm
@@ -97,6 +98,7 @@
 
 org.apache.logging.log4j
 log4j-core
+${log4j2.version}
 
 
 



struts-examples git commit: Updates readme

2016-01-10 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 9681d33b3 -> 3fb6af7f9


Updates readme


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/3fb6af7f
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/3fb6af7f
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/3fb6af7f

Branch: refs/heads/master
Commit: 3fb6af7f93d5a269b95eb2399c5caf00721ab7b0
Parents: 9681d33
Author: Lukasz Lenart 
Authored: Sun Jan 10 18:36:09 2016 +0100
Committer: Lukasz Lenart 
Committed: Sun Jan 10 18:36:09 2016 +0100

--
 tiles/README.md | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/3fb6af7f/tiles/README.md
--
diff --git a/tiles/README.md b/tiles/README.md
index e954859..7712f52 100644
--- a/tiles/README.md
+++ b/tiles/README.md
@@ -1,12 +1,6 @@
-Struts2 Tiles demo
+Struts 2 Tiles example
 ==
 
-[![Build 
Status](https://travis-ci.org/lukaszlenart/struts2-tiles-demo.png?branch=master)](https://travis-ci.org/lukaszlenart/struts2-tiles-demo)
-
-Simple Struts2 project with Tiles
+Simple Struts 2 project which demonstrates Tiles usage, there few different 
Tiles definitions which are using JSP or FreeMarker
 
 Published under [Apache License 
2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
-
-
-[![Bitdeli 
Badge](https://d2weczhvl823v0.cloudfront.net/lukaszlenart/struts2-tiles-demo/trend.png)](https://bitdeli.com/free
 "Bitdeli Badge")
-