You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2016/07/15 13:18:28 UTC

[01/50] [abbrv] struts git commit: A proper way to close the db connection

Repository: struts
Updated Branches:
  refs/heads/master cdbf697ad -> 70fdc00f6


A proper way to close the db connection


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

Branch: refs/heads/master
Commit: cee303a4c449f66cb3245de4cfe3915e220b8549
Parents: 9420789
Author: Victor Sosa <vi...@gmail.com>
Authored: Sun Jan 3 08:05:03 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:17:09 2016 +0100

----------------------------------------------------------------------
 .../struts2/views/jasperreports/JasperReportsResult.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/cee303a4/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index 921a010..e0ea121 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -386,7 +386,11 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
             LOG.error("Error producing {} report for uri {}", format, systemId, e);
             throw new ServletException(e.getMessage(), e);
         } finally {
-            conn.close();
+            try {
+                conn.close();
+            } catch (Exception e) {
+                LOG.warn("Could not close db connection properly", e);
+            }
         }
 
         response.setContentLength(output.size());


[05/50] [abbrv] struts git commit: Patch WW-3266

Posted by lu...@apache.org.
Patch WW-3266

getFieldValue() method of ValueStackDataSource uses getDescription() to
get field value may not appropriate


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

Branch: refs/heads/master
Commit: c0670209bac3d911b6f76850a6d36dbea64b91e2
Parents: b84fd6f
Author: Victor Sosa <vi...@gmail.com>
Authored: Thu Jan 7 11:09:58 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../struts2/views/jasperreports/ValueStackDataSource.java     | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/c0670209/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
index 81641a5..c39b34e 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
@@ -92,12 +92,7 @@ public class ValueStackDataSource implements JRRewindableDataSource {
         //TODO: move the code to return a ValueStackDataSource to a seperate
         //      method when and if the JRDataSource interface is updated to support
         //      this.
-        String expression = field.getDescription();
-
-        if (expression == null) {
-            //Description is optional so use the field name as a default
-            expression = field.getName();
-        }
+        String expression = field.getName();
 
         Object value = valueStack.findValue(expression);
         LOG.debug("Field [{}] = [{}]", field.getName(), value);


[28/50] [abbrv] struts git commit: WW-4507 - adjust Tomcat url decoding code to Log4j 2 logging used in Struts

Posted by lu...@apache.org.
WW-4507 - adjust Tomcat url decoding code to Log4j 2 logging used in Struts


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

Branch: refs/heads/master
Commit: 4720f46a63caaf9db97ba27dc51ac5ad21e66bdc
Parents: 76f1884
Author: Rene Gielen <rg...@apache.org>
Authored: Thu Jan 14 15:24:34 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/struts2/util/tomcat/buf/StringCache.java   | 6 +++---
 .../main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/4720f46a/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
index 3a72d49..f982b7d 100644
--- a/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
@@ -16,8 +16,8 @@
  */
 package org.apache.struts2.util.tomcat.buf;
 
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.nio.charset.Charset;
 import java.util.ArrayList;
@@ -33,7 +33,7 @@ import java.util.TreeMap;
 public class StringCache {
 
 
-    private static final Logger log = LoggerFactory.getLogger(StringCache.class);
+    private static final Logger log = LogManager.getLogger(StringCache.class);
 
 
     // ------------------------------------------------------- Static Variables

http://git-wip-us.apache.org/repos/asf/struts/blob/4720f46a/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
index b52cda7..7f9beec 100644
--- a/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
@@ -16,9 +16,9 @@
  */
 package org.apache.struts2.util.tomcat.buf;
 
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
-import com.opensymphony.xwork2.util.logging.Logger;
 import java.io.CharConversionException;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
@@ -33,7 +33,7 @@ import java.io.UnsupportedEncodingException;
  */
 public final class UDecoder {
 
-    private static final Logger log = LoggerFactory.getLogger(UDecoder.class);
+    private static final Logger log = LogManager.getLogger(UDecoder.class);
 
     public static final boolean ALLOW_ENCODED_SLASH =
         Boolean.parseBoolean(System.getProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "false"));


[41/50] [abbrv] struts git commit: Uses existing constants instead of literals

Posted by lu...@apache.org.
Uses existing constants instead of literals


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

Branch: refs/heads/master
Commit: 6274820e8013bb8d5919ac1033ef77f3bb0ed5f0
Parents: 5eaef08
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Fri Jan 15 08:44:25 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:20 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/struts/blob/6274820e/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 2c9b094..57594af 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
@@ -149,8 +149,8 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
         DefinitionPatternMatcherFactory regexpFactory = new RegexpDefinitionPatternMatcherFactory();
         PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<>();
 
-        resolver.registerDefinitionPatternMatcherFactory("WILDCARD", wildcardFactory);
-        resolver.registerDefinitionPatternMatcherFactory("REGEXP", regexpFactory);
+        resolver.registerDefinitionPatternMatcherFactory(PATTERN_WILDCARD, wildcardFactory);
+        resolver.registerDefinitionPatternMatcherFactory(PATTERN_REGEXP, regexpFactory);
 
         return resolver;
     }


[34/50] [abbrv] struts git commit: Defines helper method to fetch ActionContext from request

Posted by lu...@apache.org.
Defines helper method to fetch ActionContext from request


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

Branch: refs/heads/master
Commit: 4c6e51b302a50215b06a79051dfe12e19a4bce91
Parents: 375faa4
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Wed Jan 13 12:05:03 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../StrutsFreeMarkerAttributeRenderer.java      | 30 +++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/4c6e51b3/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 48592e0..fbc5416 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
@@ -36,7 +36,9 @@ import org.apache.struts2.views.freemarker.StrutsBeanWrapper;
 import org.apache.tiles.freemarker.template.TilesFMModelRepository;
 import org.apache.tiles.impl.InvalidTemplateException;
 import org.apache.tiles.request.Request;
+import org.apache.tiles.request.jsp.JspRequest;
 import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.servlet.ServletRequest;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
@@ -51,10 +53,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
         if (path != null) {
             LOG.trace("Rendering freemarker tile ...");
 
-            ActionContext ctx = ServletActionContext.getActionContext((HttpServletRequest) request);
-            if (ctx == null) {
-                throw new ConfigurationException("There is no ActionContext for current request!");
-            }
+            ActionContext ctx = readActionContext(request);
 
             registerTilesBeanModel(ctx);
 
@@ -77,6 +76,29 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
         }
     }
 
+    /**
+     * Depending how Tiles definition was defined, request can an instance of JspRequest (for JSPs)
+     * or a ServletRequest (FreeMarker)
+     */
+    protected ActionContext readActionContext(Request request) {
+        ActionContext ctx = null;
+
+        if (request instanceof ServletRequest) {
+            HttpServletRequest httpRequest = ((ServletRequest) request).getRequest();
+            ctx = ServletActionContext.getActionContext(httpRequest);
+        }
+        if (request instanceof JspRequest) {
+            HttpServletRequest httpRequest = (HttpServletRequest) ((JspRequest) request).getPageContext().getRequest();
+            ctx = ServletActionContext.getActionContext(httpRequest);
+        }
+
+        if (ctx == null) {
+            throw new ConfigurationException("There is no ActionContext for current request!");
+        }
+
+        return ctx;
+    }
+
     @Override
     public boolean isRenderable(String path, Request request) {
         return path != null && path.startsWith("/") && path.endsWith(".ftl");


[30/50] [abbrv] struts git commit: Adds missing dependencies to tiles-request

Posted by lu...@apache.org.
Adds missing dependencies to tiles-request


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

Branch: refs/heads/master
Commit: 375faa41d4494108b04bb57a02511650cd1fad4e
Parents: 21a1e8b
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Wed Jan 13 12:04:43 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 plugins/tiles/pom.xml | 18 +++++++++++++++++-
 pom.xml               | 15 +++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/375faa41/plugins/tiles/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index 09cd71e..0b964af 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -48,8 +48,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.tiles</groupId>
+            <artifactId>tiles-request-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tiles</groupId>
+            <artifactId>tiles-request-jsp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tiles</groupId>
+            <artifactId>tiles-request-servlet</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tiles</groupId>
             <artifactId>tiles-jsp</artifactId>
-            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.tiles</groupId>
@@ -68,6 +79,11 @@
             <artifactId>javax.el</artifactId>
             <optional>true</optional>
         </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jsp-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
     <properties>
     	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/struts/blob/375faa41/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1e0f708..5d836d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -626,6 +626,21 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-request-api</artifactId>
+                <version>${tiles-request.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-request-jsp</artifactId>
+                <version>${tiles-request.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-request-servlet</artifactId>
+                <version>${tiles-request.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
                 <artifactId>tiles-jsp</artifactId>
                 <version>${tiles.version}</version>
             </dependency>


[02/50] [abbrv] struts git commit: Patch WW-3462

Posted by lu...@apache.org.
Patch WW-3462

connection open after report generation

Now the connection is close after been used.


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

Branch: refs/heads/master
Commit: 9420789862ffe073b05a5028aa792d160e334918
Parents: 8d4bb89
Author: Victor Sosa <vi...@gmail.com>
Authored: Sun Jan 3 07:34:00 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:17:09 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/views/jasperreports/JasperReportsResult.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/94207898/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index e356506..921a010 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -385,6 +385,8 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
         } catch (JRException e) {
             LOG.error("Error producing {} report for uri {}", format, systemId, e);
             throw new ServletException(e.getMessage(), e);
+        } finally {
+            conn.close();
         }
 
         response.setContentLength(output.size());


[33/50] [abbrv] struts git commit: WW-4507 - clone Tomcat UDecoder and use it for in query string handling (cherry picked from commit 5421930)

Posted by lu...@apache.org.
WW-4507 - clone Tomcat UDecoder and use it for in query string handling
(cherry picked from commit 5421930)


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

Branch: refs/heads/master
Commit: 76f188406eb9f17a06afcb5f49f0c44d749da0d2
Parents: b0613a6
Author: Rene Gielen <rg...@apache.org>
Authored: Thu Jan 14 14:52:03 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../dispatcher/mapper/Restful2ActionMapper.java |   6 +-
 .../dispatcher/mapper/RestfulActionMapper.java  |   6 +-
 .../org/apache/struts2/util/URLDecoderUtil.java |  22 +
 .../apache/struts2/util/tomcat/buf/Ascii.java   | 255 +++++
 .../struts2/util/tomcat/buf/B2CConverter.java   | 201 ++++
 .../struts2/util/tomcat/buf/ByteChunk.java      | 935 +++++++++++++++++++
 .../struts2/util/tomcat/buf/CharChunk.java      | 700 ++++++++++++++
 .../struts2/util/tomcat/buf/HexUtils.java       | 113 +++
 .../struts2/util/tomcat/buf/MessageBytes.java   | 546 +++++++++++
 .../struts2/util/tomcat/buf/StringCache.java    | 695 ++++++++++++++
 .../struts2/util/tomcat/buf/UDecoder.java       | 421 +++++++++
 .../struts2/util/tomcat/buf/Utf8Decoder.java    | 293 ++++++
 .../struts2/views/util/DefaultUrlHelper.java    |   7 +-
 .../apache/struts2/util/URLDecoderUtilTest.java |  71 ++
 14 files changed, 4262 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
index b474913..c2a9bfc 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
@@ -27,9 +27,9 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.util.URLDecoderUtil;
 
 import javax.servlet.http.HttpServletRequest;
-import java.net.URLDecoder;
 import java.util.HashMap;
 import java.util.StringTokenizer;
 
@@ -132,10 +132,10 @@ public class Restful2ActionMapper extends DefaultActionMapper {
 
                     while (st.hasMoreTokens()) {
                         if (isNameTok) {
-                            paramName = URLDecoder.decode(st.nextToken(), "UTF-8");
+                            paramName = URLDecoderUtil.decode(st.nextToken(), "UTF-8");
                             isNameTok = false;
                         } else {
-                            paramValue = URLDecoder.decode(st.nextToken(), "UTF-8");
+                            paramValue = URLDecoderUtil.decode(st.nextToken(), "UTF-8");
 
                             if ((paramName != null) && (paramName.length() > 0)) {
                                 parameters.put(paramName, paramValue);

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
index d7ae2c0..9db58e3 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
@@ -25,9 +25,9 @@ import com.opensymphony.xwork2.config.ConfigurationManager;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.struts2.RequestUtils;
+import org.apache.struts2.util.URLDecoderUtil;
 
 import javax.servlet.http.HttpServletRequest;
-import java.net.URLDecoder;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.StringTokenizer;
@@ -67,10 +67,10 @@ public class RestfulActionMapper implements ActionMapper {
 
             while (st.hasMoreTokens()) {
                 if (isNameTok) {
-                    paramName = URLDecoder.decode(st.nextToken(), "UTF-8");
+                    paramName = URLDecoderUtil.decode(st.nextToken(), "UTF-8");
                     isNameTok = false;
                 } else {
-                    paramValue = URLDecoder.decode(st.nextToken(), "UTF-8");
+                    paramValue = URLDecoderUtil.decode(st.nextToken(), "UTF-8");
 
                     if ((paramName != null) && (paramName.length() > 0)) {
                         parameters.put(paramName, paramValue);

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/URLDecoderUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/URLDecoderUtil.java b/core/src/main/java/org/apache/struts2/util/URLDecoderUtil.java
new file mode 100644
index 0000000..10f2a78
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/URLDecoderUtil.java
@@ -0,0 +1,22 @@
+package org.apache.struts2.util;
+
+import org.apache.struts2.util.tomcat.buf.UDecoder;
+
+/**
+ * URLDecoderUtil serves as a facade for a correct URL decoding implementation.
+ * As of Struts 2.3.25 it uses Tomcat URLDecoder functionality rather than the one found in java.io.
+ */
+public class URLDecoderUtil {
+
+    /**
+     * Decodes a <code>x-www-form-urlencoded</code> string.
+     * @param sequence the String to decode
+     * @param charset The name of a supported character encoding.
+     * @return the newly decoded <code>String</code>
+     * @exception IllegalArgumentException If the encoding is not valid
+     */
+    public static String decode(String sequence, String charset) {
+        return UDecoder.URLDecode(sequence, charset);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/Ascii.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/Ascii.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/Ascii.java
new file mode 100644
index 0000000..1b0ccb6
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/Ascii.java
@@ -0,0 +1,255 @@
+/*
+ *  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.util.tomcat.buf;
+
+/**
+ * This class implements some basic ASCII character handling functions.
+ *
+ * @author dac@eng.sun.com
+ * @author James Todd [gonzo@eng.sun.com]
+ */
+public final class Ascii {
+    /*
+     * Character translation tables.
+     */
+
+    private static final byte[] toUpper = new byte[256];
+    private static final byte[] toLower = new byte[256];
+
+    /*
+     * Character type tables.
+     */
+
+    private static final boolean[] isAlpha = new boolean[256];
+    private static final boolean[] isUpper = new boolean[256];
+    private static final boolean[] isLower = new boolean[256];
+    private static final boolean[] isWhite = new boolean[256];
+    private static final boolean[] isDigit = new boolean[256];
+
+    private static final long OVERFLOW_LIMIT = Long.MAX_VALUE / 10;
+
+    /*
+     * Initialize character translation and type tables.
+     */
+    static {
+        for (int i = 0; i < 256; i++) {
+            toUpper[i] = (byte)i;
+            toLower[i] = (byte)i;
+        }
+
+        for (int lc = 'a'; lc <= 'z'; lc++) {
+            int uc = lc + 'A' - 'a';
+
+            toUpper[lc] = (byte)uc;
+            toLower[uc] = (byte)lc;
+            isAlpha[lc] = true;
+            isAlpha[uc] = true;
+            isLower[lc] = true;
+            isUpper[uc] = true;
+        }
+
+        isWhite[ ' '] = true;
+        isWhite['\t'] = true;
+        isWhite['\r'] = true;
+        isWhite['\n'] = true;
+        isWhite['\f'] = true;
+        isWhite['\b'] = true;
+
+        for (int d = '0'; d <= '9'; d++) {
+            isDigit[d] = true;
+        }
+    }
+
+    /**
+     * Returns the upper case equivalent of the specified ASCII character.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static int toUpper(int c) {
+        return toUpper[c & 0xff] & 0xff;
+    }
+
+    /**
+     * Returns the lower case equivalent of the specified ASCII character.
+     */
+
+    public static int toLower(int c) {
+        return toLower[c & 0xff] & 0xff;
+    }
+
+    /**
+     * Returns true if the specified ASCII character is upper or lower case.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static boolean isAlpha(int c) {
+        return isAlpha[c & 0xff];
+    }
+
+    /**
+     * Returns true if the specified ASCII character is upper case.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static boolean isUpper(int c) {
+        return isUpper[c & 0xff];
+    }
+
+    /**
+     * Returns true if the specified ASCII character is lower case.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static boolean isLower(int c) {
+        return isLower[c & 0xff];
+    }
+
+    /**
+     * Returns true if the specified ASCII character is white space.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static boolean isWhite(int c) {
+        return isWhite[c & 0xff];
+    }
+
+    /**
+     * Returns true if the specified ASCII character is a digit.
+     */
+
+    public static boolean isDigit(int c) {
+        return isDigit[c & 0xff];
+    }
+
+    /**
+     * Parses an unsigned integer from the specified subarray of bytes.
+     * @param b the bytes to parse
+     * @param off the start offset of the bytes
+     * @param len the length of the bytes
+     * @exception NumberFormatException if the integer format was invalid
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static int parseInt(byte[] b, int off, int len)
+            throws NumberFormatException
+    {
+        int c;
+
+        if (b == null || len <= 0 || !isDigit(c = b[off++])) {
+            throw new NumberFormatException();
+        }
+
+        int n = c - '0';
+
+        while (--len > 0) {
+            if (!isDigit(c = b[off++])) {
+                throw new NumberFormatException();
+            }
+            n = n * 10 + c - '0';
+        }
+
+        return n;
+    }
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static int parseInt(char[] b, int off, int len)
+            throws NumberFormatException
+    {
+        int c;
+
+        if (b == null || len <= 0 || !isDigit(c = b[off++])) {
+            throw new NumberFormatException();
+        }
+
+        int n = c - '0';
+
+        while (--len > 0) {
+            if (!isDigit(c = b[off++])) {
+                throw new NumberFormatException();
+            }
+            n = n * 10 + c - '0';
+        }
+
+        return n;
+    }
+
+    /**
+     * Parses an unsigned long from the specified subarray of bytes.
+     * @param b the bytes to parse
+     * @param off the start offset of the bytes
+     * @param len the length of the bytes
+     * @exception NumberFormatException if the long format was invalid
+     */
+    public static long parseLong(byte[] b, int off, int len)
+            throws NumberFormatException
+    {
+        int c;
+
+        if (b == null || len <= 0 || !isDigit(c = b[off++])) {
+            throw new NumberFormatException();
+        }
+
+        long n = c - '0';
+        while (--len > 0) {
+            if (isDigit(c = b[off++]) &&
+                    (n < OVERFLOW_LIMIT || (n == OVERFLOW_LIMIT && (c - '0') < 8))) {
+                n = n * 10 + c - '0';
+            } else {
+                throw new NumberFormatException();
+            }
+        }
+
+        return n;
+    }
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static long parseLong(char[] b, int off, int len)
+            throws NumberFormatException
+    {
+        int c;
+
+        if (b == null || len <= 0 || !isDigit(c = b[off++])) {
+            throw new NumberFormatException();
+        }
+
+        long n = c - '0';
+        long m;
+
+        while (--len > 0) {
+            if (!isDigit(c = b[off++])) {
+                throw new NumberFormatException();
+            }
+            m = n * 10 + c - '0';
+
+            if (m < n) {
+                // Overflow
+                throw new NumberFormatException();
+            } else {
+                n = m;
+            }
+        }
+
+        return n;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/B2CConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/B2CConverter.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/B2CConverter.java
new file mode 100644
index 0000000..a3fc6d1
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/B2CConverter.java
@@ -0,0 +1,201 @@
+/*
+ *  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.util.tomcat.buf;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CoderResult;
+import java.nio.charset.CodingErrorAction;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * NIO based character decoder.
+ */
+public class B2CConverter {
+
+    private static final Map<String, Charset> encodingToCharsetCache =
+            new HashMap<String, Charset>();
+
+    public static final Charset ISO_8859_1;
+    public static final Charset UTF_8;
+
+    // Protected so unit tests can use it
+    protected static final int LEFTOVER_SIZE = 9;
+
+    static {
+        for (Charset charset: Charset.availableCharsets().values()) {
+            encodingToCharsetCache.put(
+                    charset.name().toLowerCase(Locale.ENGLISH), charset);
+            for (String alias : charset.aliases()) {
+                encodingToCharsetCache.put(
+                        alias.toLowerCase(Locale.ENGLISH), charset);
+            }
+        }
+        Charset iso88591 = null;
+        Charset utf8 = null;
+        try {
+            iso88591 = getCharset("ISO-8859-1");
+            utf8 = getCharset("UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            // Impossible. All JVMs must support these.
+            e.printStackTrace();
+        }
+        ISO_8859_1 = iso88591;
+        UTF_8 = utf8;
+    }
+
+    public static Charset getCharset(String enc)
+            throws UnsupportedEncodingException {
+
+        // Encoding names should all be ASCII
+        String lowerCaseEnc = enc.toLowerCase(Locale.ENGLISH);
+
+        return getCharsetLower(lowerCaseEnc);
+    }
+
+    /**
+     * Only to be used when it is known that the encoding name is in lower case.
+     */
+    public static Charset getCharsetLower(String lowerCaseEnc)
+            throws UnsupportedEncodingException {
+
+        Charset charset = encodingToCharsetCache.get(lowerCaseEnc);
+
+        if (charset == null) {
+            // Pre-population of the cache means this must be invalid
+            throw new UnsupportedEncodingException("The character encoding " + lowerCaseEnc + " is not supported");
+        }
+        return charset;
+    }
+
+    private final CharsetDecoder decoder;
+    private ByteBuffer bb = null;
+    private CharBuffer cb = null;
+
+    /**
+     * Leftover buffer used for incomplete characters.
+     */
+    private final ByteBuffer leftovers;
+
+    public B2CConverter(String encoding) throws IOException {
+        this(encoding, false);
+    }
+
+    public B2CConverter(String encoding, boolean replaceOnError)
+            throws IOException {
+        byte[] left = new byte[LEFTOVER_SIZE];
+        leftovers = ByteBuffer.wrap(left);
+        CodingErrorAction action;
+        if (replaceOnError) {
+            action = CodingErrorAction.REPLACE;
+        } else {
+            action = CodingErrorAction.REPORT;
+        }
+        Charset charset = getCharset(encoding);
+        // Special case. Use the Apache Harmony based UTF-8 decoder because it
+        // - a) rejects invalid sequences that the JVM decoder does not
+        // - b) fails faster for some invalid sequences
+        if (charset.equals(UTF_8)) {
+            decoder = new Utf8Decoder();
+        } else {
+            decoder = charset.newDecoder();
+        }
+        decoder.onMalformedInput(action);
+        decoder.onUnmappableCharacter(action);
+    }
+
+    /**
+     * Reset the decoder state.
+     */
+    public void recycle() {
+        decoder.reset();
+        leftovers.position(0);
+    }
+
+    /**
+     * Convert the given bytes to characters.
+     *
+     * @param bc byte input
+     * @param cc char output
+     * @param endOfInput    Is this all of the available data
+     */
+    public void convert(ByteChunk bc, CharChunk cc, boolean endOfInput)
+            throws IOException {
+        if ((bb == null) || (bb.array() != bc.getBuffer())) {
+            // Create a new byte buffer if anything changed
+            bb = ByteBuffer.wrap(bc.getBuffer(), bc.getStart(), bc.getLength());
+        } else {
+            // Initialize the byte buffer
+            bb.limit(bc.getEnd());
+            bb.position(bc.getStart());
+        }
+        if ((cb == null) || (cb.array() != cc.getBuffer())) {
+            // Create a new char buffer if anything changed
+            cb = CharBuffer.wrap(cc.getBuffer(), cc.getEnd(),
+                    cc.getBuffer().length - cc.getEnd());
+        } else {
+            // Initialize the char buffer
+            cb.limit(cc.getBuffer().length);
+            cb.position(cc.getEnd());
+        }
+        CoderResult result = null;
+        // Parse leftover if any are present
+        if (leftovers.position() > 0) {
+            int pos = cb.position();
+            // Loop until one char is decoded or there is a decoder error
+            do {
+                leftovers.put(bc.substractB());
+                leftovers.flip();
+                result = decoder.decode(leftovers, cb, endOfInput);
+                leftovers.position(leftovers.limit());
+                leftovers.limit(leftovers.array().length);
+            } while (result.isUnderflow() && (cb.position() == pos));
+            if (result.isError() || result.isMalformed()) {
+                result.throwException();
+            }
+            bb.position(bc.getStart());
+            leftovers.position(0);
+        }
+        // Do the decoding and get the results into the byte chunk and the char
+        // chunk
+        result = decoder.decode(bb, cb, endOfInput);
+        if (result.isError() || result.isMalformed()) {
+            result.throwException();
+        } else if (result.isOverflow()) {
+            // Propagate current positions to the byte chunk and char chunk, if
+            // this continues the char buffer will get resized
+            bc.setOffset(bb.position());
+            cc.setEnd(cb.position());
+        } else if (result.isUnderflow()) {
+            // Propagate current positions to the byte chunk and char chunk
+            bc.setOffset(bb.position());
+            cc.setEnd(cb.position());
+            // Put leftovers in the leftovers byte buffer
+            if (bc.getLength() > 0) {
+                leftovers.limit(leftovers.array().length);
+                leftovers.position(bc.getLength());
+                bc.substract(leftovers.array(), 0, bc.getLength());
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/ByteChunk.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/ByteChunk.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/ByteChunk.java
new file mode 100644
index 0000000..aff247f
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/ByteChunk.java
@@ -0,0 +1,935 @@
+/*
+ *  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.util.tomcat.buf;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+
+/*
+ * In a server it is very important to be able to operate on
+ * the original byte[] without converting everything to chars.
+ * Some protocols are ASCII only, and some allow different
+ * non-UNICODE encodings. The encoding is not known beforehand,
+ * and can even change during the execution of the protocol.
+ * ( for example a multipart message may have parts with different
+ *  encoding )
+ *
+ * For HTTP it is not very clear how the encoding of RequestURI
+ * and mime values can be determined, but it is a great advantage
+ * to be able to parse the request without converting to string.
+ */
+
+// TODO: This class could either extend ByteBuffer, or better a ByteBuffer
+// inside this way it could provide the search/etc on ByteBuffer, as a helper.
+
+/**
+ * This class is used to represent a chunk of bytes, and
+ * utilities to manipulate byte[].
+ *
+ * The buffer can be modified and used for both input and output.
+ *
+ * There are 2 modes: The chunk can be associated with a sink - ByteInputChannel
+ * or ByteOutputChannel, which will be used when the buffer is empty (on input)
+ * or filled (on output).
+ * For output, it can also grow. This operating mode is selected by calling
+ * setLimit() or allocate(initial, limit) with limit != -1.
+ *
+ * Various search and append method are defined - similar with String and
+ * StringBuffer, but operating on bytes.
+ *
+ * This is important because it allows processing the http headers directly on
+ * the received bytes, without converting to chars and Strings until the strings
+ * are needed. In addition, the charset is determined later, from headers or
+ * user code.
+ *
+ * @author dac@sun.com
+ * @author James Todd [gonzo@sun.com]
+ * @author Costin Manolache
+ * @author Remy Maucherat
+ */
+public final class ByteChunk implements Cloneable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /** Input interface, used when the buffer is empty
+     *
+     * Same as java.nio.channel.ReadableByteChannel
+     */
+    public static interface ByteInputChannel {
+        /**
+         * Read new bytes ( usually the internal conversion buffer ).
+         * The implementation is allowed to ignore the parameters,
+         * and mutate the chunk if it wishes to implement its own buffering.
+         */
+        public int realReadBytes(byte cbuf[], int off, int len)
+                throws IOException;
+    }
+
+    /** Same as java.nio.channel.WrittableByteChannel.
+     */
+    public static interface ByteOutputChannel {
+        /**
+         * Send the bytes ( usually the internal conversion buffer ).
+         * Expect 8k output if the buffer is full.
+         */
+        public void realWriteBytes(byte cbuf[], int off, int len)
+                throws IOException;
+    }
+
+    // --------------------
+
+    /** Default encoding used to convert to strings. It should be UTF8,
+     as most standards seem to converge, but the servlet API requires
+     8859_1, and this object is used mostly for servlets.
+     */
+    public static final Charset DEFAULT_CHARSET = B2CConverter.ISO_8859_1;
+
+    // byte[]
+    private byte[] buff;
+
+    private int start=0;
+    private int end;
+
+    private Charset charset;
+
+    private boolean isSet=false; // XXX
+
+    // How much can it grow, when data is added
+    private int limit=-1;
+
+    private ByteInputChannel in = null;
+    private ByteOutputChannel out = null;
+
+    private boolean optimizedWrite=true;
+
+    /**
+     * Creates a new, uninitialized ByteChunk object.
+     */
+    public ByteChunk() {
+        // NO-OP
+    }
+
+    public ByteChunk( int initial ) {
+        allocate( initial, -1 );
+    }
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public ByteChunk getClone() {
+        try {
+            return (ByteChunk)this.clone();
+        } catch( Exception ex) {
+            return null;
+        }
+    }
+
+    public boolean isNull() {
+        return ! isSet; // buff==null;
+    }
+
+    /**
+     * Resets the message buff to an uninitialized state.
+     */
+    public void recycle() {
+        //        buff = null;
+        charset=null;
+        start=0;
+        end=0;
+        isSet=false;
+    }
+
+    public void reset() {
+        buff=null;
+    }
+
+    // -------------------- Setup --------------------
+
+    public void allocate( int initial, int limit  ) {
+        if( buff==null || buff.length < initial ) {
+            buff=new byte[initial];
+        }
+        this.limit=limit;
+        start=0;
+        end=0;
+        isSet=true;
+    }
+
+    /**
+     * Sets the message bytes to the specified subarray of bytes.
+     *
+     * @param b the ascii bytes
+     * @param off the start offset of the bytes
+     * @param len the length of the bytes
+     */
+    public void setBytes(byte[] b, int off, int len) {
+        buff = b;
+        start = off;
+        end = start+ len;
+        isSet=true;
+    }
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public void setOptimizedWrite(boolean optimizedWrite) {
+        this.optimizedWrite = optimizedWrite;
+    }
+
+    public void setCharset(Charset charset) {
+        this.charset = charset;
+    }
+
+    public Charset getCharset() {
+        if (charset == null) {
+            charset = DEFAULT_CHARSET;
+        }
+        return charset;
+    }
+
+    /**
+     * Returns the message bytes.
+     */
+    public byte[] getBytes() {
+        return getBuffer();
+    }
+
+    /**
+     * Returns the message bytes.
+     */
+    public byte[] getBuffer() {
+        return buff;
+    }
+
+    /**
+     * Returns the start offset of the bytes.
+     * For output this is the end of the buffer.
+     */
+    public int getStart() {
+        return start;
+    }
+
+    public int getOffset() {
+        return start;
+    }
+
+    public void setOffset(int off) {
+        if (end < off ) {
+            end=off;
+        }
+        start=off;
+    }
+
+    /**
+     * Returns the length of the bytes.
+     * XXX need to clean this up
+     */
+    public int getLength() {
+        return end-start;
+    }
+
+    /** Maximum amount of data in this buffer.
+     *
+     *  If -1 or not set, the buffer will grow indefinitely.
+     *  Can be smaller than the current buffer size ( which will not shrink ).
+     *  When the limit is reached, the buffer will be flushed ( if out is set )
+     *  or throw exception.
+     */
+    public void setLimit(int limit) {
+        this.limit=limit;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    /**
+     * When the buffer is empty, read the data from the input channel.
+     */
+    public void setByteInputChannel(ByteInputChannel in) {
+        this.in = in;
+    }
+
+    /** When the buffer is full, write the data to the output channel.
+     *         Also used when large amount of data is appended.
+     *
+     *  If not set, the buffer will grow to the limit.
+     */
+    public void setByteOutputChannel(ByteOutputChannel out) {
+        this.out=out;
+    }
+
+    public int getEnd() {
+        return end;
+    }
+
+    public void setEnd( int i ) {
+        end=i;
+    }
+
+    // -------------------- Adding data to the buffer --------------------
+    /** Append a char, by casting it to byte. This IS NOT intended for unicode.
+     *
+     * @param c
+     * @throws IOException
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public void append( char c )
+            throws IOException
+    {
+        append( (byte)c);
+    }
+
+    public void append( byte b )
+            throws IOException
+    {
+        makeSpace( 1 );
+
+        // couldn't make space
+        if( limit >0 && end >= limit ) {
+            flushBuffer();
+        }
+        buff[end++]=b;
+    }
+
+    public void append( ByteChunk src )
+            throws IOException
+    {
+        append( src.getBytes(), src.getStart(), src.getLength());
+    }
+
+    /** Add data to the buffer
+     */
+    public void append( byte src[], int off, int len )
+            throws IOException
+    {
+        // will grow, up to limit
+        makeSpace( len );
+
+        // if we don't have limit: makeSpace can grow as it wants
+        if( limit < 0 ) {
+            // assert: makeSpace made enough space
+            System.arraycopy( src, off, buff, end, len );
+            end+=len;
+            return;
+        }
+
+        // Optimize on a common case.
+        // If the buffer is empty and the source is going to fill up all the
+        // space in buffer, may as well write it directly to the output,
+        // and avoid an extra copy
+        if ( optimizedWrite && len == limit && end == start && out != null ) {
+            out.realWriteBytes( src, off, len );
+            return;
+        }
+        // if we have limit and we're below
+        if( len <= limit - end ) {
+            // makeSpace will grow the buffer to the limit,
+            // so we have space
+            System.arraycopy( src, off, buff, end, len );
+            end+=len;
+            return;
+        }
+
+        // need more space than we can afford, need to flush
+        // buffer
+
+        // the buffer is already at ( or bigger than ) limit
+
+        // We chunk the data into slices fitting in the buffer limit, although
+        // if the data is written directly if it doesn't fit
+
+        int avail=limit-end;
+        System.arraycopy(src, off, buff, end, avail);
+        end += avail;
+
+        flushBuffer();
+
+        int remain = len - avail;
+
+        while (remain > (limit - end)) {
+            out.realWriteBytes( src, (off + len) - remain, limit - end );
+            remain = remain - (limit - end);
+        }
+
+        System.arraycopy(src, (off + len) - remain, buff, end, remain);
+        end += remain;
+
+    }
+
+
+    // -------------------- Removing data from the buffer --------------------
+
+    public int substract()
+            throws IOException {
+
+        if ((end - start) == 0) {
+            if (in == null) {
+                return -1;
+            }
+            int n = in.realReadBytes( buff, 0, buff.length );
+            if (n < 0) {
+                return -1;
+            }
+        }
+
+        return (buff[start++] & 0xFF);
+
+    }
+
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public int substract(ByteChunk src)
+            throws IOException {
+
+        if ((end - start) == 0) {
+            if (in == null) {
+                return -1;
+            }
+            int n = in.realReadBytes( buff, 0, buff.length );
+            if (n < 0) {
+                return -1;
+            }
+        }
+
+        int len = getLength();
+        src.append(buff, start, len);
+        start = end;
+        return len;
+
+    }
+
+
+    public byte substractB()
+            throws IOException {
+
+        if ((end - start) == 0) {
+            if (in == null)
+                return -1;
+            int n = in.realReadBytes( buff, 0, buff.length );
+            if (n < 0)
+                return -1;
+        }
+
+        return (buff[start++]);
+
+    }
+
+
+    public int substract( byte src[], int off, int len )
+            throws IOException {
+
+        if ((end - start) == 0) {
+            if (in == null) {
+                return -1;
+            }
+            int n = in.realReadBytes( buff, 0, buff.length );
+            if (n < 0) {
+                return -1;
+            }
+        }
+
+        int n = len;
+        if (len > getLength()) {
+            n = getLength();
+        }
+        System.arraycopy(buff, start, src, off, n);
+        start += n;
+        return n;
+
+    }
+
+
+    /**
+     * Send the buffer to the sink. Called by append() when the limit is
+     * reached. You can also call it explicitly to force the data to be written.
+     *
+     * @throws IOException
+     */
+    public void flushBuffer()
+            throws IOException
+    {
+        //assert out!=null
+        if( out==null ) {
+            throw new IOException( "Buffer overflow, no sink " + limit + " " +
+                    buff.length  );
+        }
+        out.realWriteBytes( buff, start, end-start );
+        end=start;
+    }
+
+    /**
+     * Make space for len chars. If len is small, allocate a reserve space too.
+     * Never grow bigger than limit.
+     */
+    public void makeSpace(int count) {
+        byte[] tmp = null;
+
+        int newSize;
+        int desiredSize=end + count;
+
+        // Can't grow above the limit
+        if( limit > 0 &&
+                desiredSize > limit) {
+            desiredSize=limit;
+        }
+
+        if( buff==null ) {
+            if( desiredSize < 256 )
+            {
+                desiredSize=256; // take a minimum
+            }
+            buff=new byte[desiredSize];
+        }
+
+        // limit < buf.length ( the buffer is already big )
+        // or we already have space XXX
+        if( desiredSize <= buff.length ) {
+            return;
+        }
+        // grow in larger chunks
+        if( desiredSize < 2 * buff.length ) {
+            newSize= buff.length * 2;
+            if( limit >0 &&
+                    newSize > limit ) {
+                newSize=limit;
+            }
+            tmp=new byte[newSize];
+        } else {
+            newSize= buff.length * 2 + count ;
+            if( limit > 0 &&
+                    newSize > limit ) {
+                newSize=limit;
+            }
+            tmp=new byte[newSize];
+        }
+
+        System.arraycopy(buff, start, tmp, 0, end-start);
+        buff = tmp;
+        tmp = null;
+        end=end-start;
+        start=0;
+    }
+
+    // -------------------- Conversion and getters --------------------
+
+    @Override
+    public String toString() {
+        if (null == buff) {
+            return null;
+        } else if (end-start == 0) {
+            return "";
+        }
+        return StringCache.toString(this);
+    }
+
+    public String toStringInternal() {
+        if (charset == null) {
+            charset = DEFAULT_CHARSET;
+        }
+        // new String(byte[], int, int, Charset) takes a defensive copy of the
+        // entire byte array. This is expensive if only a small subset of the
+        // bytes will be used. The code below is from Apache Harmony.
+        CharBuffer cb;
+        cb = charset.decode(ByteBuffer.wrap(buff, start, end-start));
+        return new String(cb.array(), cb.arrayOffset(), cb.length());
+    }
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public int getInt()
+    {
+        return Ascii.parseInt(buff, start,end-start);
+    }
+
+    public long getLong() {
+        return Ascii.parseLong(buff, start,end-start);
+    }
+
+
+    // -------------------- equals --------------------
+
+    /**
+     * Compares the message bytes to the specified String object.
+     * @param s the String to compare
+     * @return true if the comparison succeeded, false otherwise
+     */
+    public boolean equals(String s) {
+        // XXX ENCODING - this only works if encoding is UTF8-compat
+        // ( ok for tomcat, where we compare ascii - header names, etc )!!!
+
+        byte[] b = buff;
+        int blen = end-start;
+        if (b == null || blen != s.length()) {
+            return false;
+        }
+        int boff = start;
+        for (int i = 0; i < blen; i++) {
+            if (b[boff++] != s.charAt(i)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Compares the message bytes to the specified String object.
+     * @param s the String to compare
+     * @return true if the comparison succeeded, false otherwise
+     */
+    public boolean equalsIgnoreCase(String s) {
+        byte[] b = buff;
+        int blen = end-start;
+        if (b == null || blen != s.length()) {
+            return false;
+        }
+        int boff = start;
+        for (int i = 0; i < blen; i++) {
+            if (Ascii.toLower(b[boff++]) != Ascii.toLower(s.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public boolean equals( ByteChunk bb ) {
+        return equals( bb.getBytes(), bb.getStart(), bb.getLength());
+    }
+
+    public boolean equals( byte b2[], int off2, int len2) {
+        byte b1[]=buff;
+        if( b1==null && b2==null ) {
+            return true;
+        }
+
+        int len=end-start;
+        if ( len2 != len || b1==null || b2==null ) {
+            return false;
+        }
+
+        int off1 = start;
+
+        while ( len-- > 0) {
+            if (b1[off1++] != b2[off2++]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public boolean equals( CharChunk cc ) {
+        return equals( cc.getChars(), cc.getStart(), cc.getLength());
+    }
+
+    public boolean equals( char c2[], int off2, int len2) {
+        // XXX works only for enc compatible with ASCII/UTF !!!
+        byte b1[]=buff;
+        if( c2==null && b1==null ) {
+            return true;
+        }
+
+        if (b1== null || c2==null || end-start != len2 ) {
+            return false;
+        }
+        int off1 = start;
+        int len=end-start;
+
+        while ( len-- > 0) {
+            if ( (char)b1[off1++] != c2[off2++]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns true if the message bytes starts with the specified string.
+     * @param s the string
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public boolean startsWith(String s) {
+        // Works only if enc==UTF
+        byte[] b = buff;
+        int blen = s.length();
+        if (b == null || blen > end-start) {
+            return false;
+        }
+        int boff = start;
+        for (int i = 0; i < blen; i++) {
+            if (b[boff++] != s.charAt(i)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns true if the message bytes start with the specified byte array.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public boolean startsWith(byte[] b2) {
+        byte[] b1 = buff;
+        if (b1 == null && b2 == null) {
+            return true;
+        }
+
+        int len = end - start;
+        if (b1 == null || b2 == null || b2.length > len) {
+            return false;
+        }
+        for (int i = start, j = 0; i < end && j < b2.length;) {
+            if (b1[i++] != b2[j++]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns true if the message bytes starts with the specified string.
+     * @param s the string
+     * @param pos The position
+     */
+    public boolean startsWithIgnoreCase(String s, int pos) {
+        byte[] b = buff;
+        int len = s.length();
+        if (b == null || len+pos > end-start) {
+            return false;
+        }
+        int off = start+pos;
+        for (int i = 0; i < len; i++) {
+            if (Ascii.toLower( b[off++] ) != Ascii.toLower( s.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public int indexOf( String src, int srcOff, int srcLen, int myOff ) {
+        char first=src.charAt( srcOff );
+
+        // Look for first char
+        int srcEnd = srcOff + srcLen;
+
+        mainLoop:
+        for( int i=myOff+start; i <= (end - srcLen); i++ ) {
+            if( buff[i] != first ) {
+                continue;
+            }
+            // found first char, now look for a match
+            int myPos=i+1;
+            for( int srcPos=srcOff + 1; srcPos< srcEnd;) {
+                if( buff[myPos++] != src.charAt( srcPos++ )) {
+                    continue mainLoop;
+                }
+            }
+            return i-start; // found it
+        }
+        return -1;
+    }
+
+    // -------------------- Hash code  --------------------
+
+    // normal hash.
+    public int hash() {
+        return hashBytes( buff, start, end-start);
+    }
+
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public int hashIgnoreCase() {
+        return hashBytesIC( buff, start, end-start );
+    }
+
+    private static int hashBytes( byte buff[], int start, int bytesLen ) {
+        int max=start+bytesLen;
+        byte bb[]=buff;
+        int code=0;
+        for (int i = start; i < max ; i++) {
+            code = code * 37 + bb[i];
+        }
+        return code;
+    }
+
+    private static int hashBytesIC( byte bytes[], int start,
+                                    int bytesLen )
+    {
+        int max=start+bytesLen;
+        byte bb[]=bytes;
+        int code=0;
+        for (int i = start; i < max ; i++) {
+            code = code * 37 + Ascii.toLower(bb[i]);
+        }
+        return code;
+    }
+
+    /**
+     * Returns the first instance of the given character in this ByteChunk
+     * starting at the specified byte. If the character is not found, -1 is
+     * returned.
+     * <br/>
+     * NOTE: This only works for characters in the range 0-127.
+     *
+     * @param c         The character
+     * @param starting  The start position
+     * @return          The position of the first instance of the character or
+     *                      -1 if the character is not found.
+     */
+    public int indexOf(char c, int starting) {
+        int ret = indexOf(buff, start + starting, end, c);
+        return (ret >= start) ? ret - start : -1;
+    }
+
+    /**
+     * Returns the first instance of the given character in the given byte array
+     * between the specified start and end.
+     * <br/>
+     * NOTE: This only works for characters in the range 0-127.
+     *
+     * @param bytes The byte array to search
+     * @param start The point to start searching from in the byte array
+     * @param end   The point to stop searching in the byte array
+     * @param c     The character to search for
+     * @return      The position of the first instance of the character or -1
+     *                  if the character is not found.
+     */
+    public static int indexOf(byte bytes[], int start, int end, char c) {
+        int offset = start;
+
+        while (offset < end) {
+            byte b=bytes[offset];
+            if (b == c) {
+                return offset;
+            }
+            offset++;
+        }
+        return -1;
+    }
+
+    /**
+     * Returns the first instance of the given byte in the byte array between
+     * the specified start and end.
+     *
+     * @param bytes The byte array to search
+     * @param start The point to start searching from in the byte array
+     * @param end   The point to stop searching in the byte array
+     * @param b     The byte to search for
+     * @return      The position of the first instance of the byte or -1 if the
+     *                  byte is not found.
+     */
+    public static int findByte(byte bytes[], int start, int end, byte b) {
+        int offset = start;
+        while (offset < end) {
+            if (bytes[offset] == b) {
+                return offset;
+            }
+            offset++;
+        }
+        return -1;
+    }
+
+    /**
+     * Returns the first instance of any of the given bytes in the byte array
+     * between the specified start and end.
+     *
+     * @param bytes The byte array to search
+     * @param start The point to start searching from in the byte array
+     * @param end   The point to stop searching in the byte array
+     * @param b     The array of bytes to search for
+     * @return      The position of the first instance of the byte or -1 if the
+     *                  byte is not found.
+     */
+    public static int findBytes(byte bytes[], int start, int end, byte b[]) {
+        int blen = b.length;
+        int offset = start;
+        while (offset < end) {
+            for (int i = 0;  i < blen; i++) {
+                if (bytes[offset] == b[i]) {
+                    return offset;
+                }
+            }
+            offset++;
+        }
+        return -1;
+    }
+
+    /**
+     * Returns the first instance of any byte that is not one of the given bytes
+     * in the byte array between the specified start and end.
+     *
+     * @param bytes The byte array to search
+     * @param start The point to start searching from in the byte array
+     * @param end   The point to stop searching in the byte array
+     * @param b     The list of bytes to search for
+     * @return      The position of the first instance a byte that is not
+     *                  in the list of bytes to search for or -1 if no such byte
+     *                  is found.
+     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
+     */
+    @Deprecated
+    public static int findNotBytes(byte bytes[], int start, int end, byte b[]) {
+        int blen = b.length;
+        int offset = start;
+        boolean found;
+
+        while (offset < end) {
+            found = true;
+            for (int i = 0; i < blen; i++) {
+                if (bytes[offset] == b[i]) {
+                    found=false;
+                    break;
+                }
+            }
+            if (found) {
+                return offset;
+            }
+            offset++;
+        }
+        return -1;
+    }
+
+
+    /**
+     * Convert specified String to a byte array. This ONLY WORKS for ascii, UTF
+     * chars will be truncated.
+     *
+     * @param value to convert to byte array
+     * @return the byte array value
+     */
+    public static final byte[] convertToBytes(String value) {
+        byte[] result = new byte[value.length()];
+        for (int i = 0; i < value.length(); i++) {
+            result[i] = (byte) value.charAt(i);
+        }
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/CharChunk.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/CharChunk.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/CharChunk.java
new file mode 100644
index 0000000..527707a
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/CharChunk.java
@@ -0,0 +1,700 @@
+/*
+ *  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.util.tomcat.buf;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * Utilities to manipulate char chunks. While String is
+ * the easiest way to manipulate chars ( search, substrings, etc),
+ * it is known to not be the most efficient solution - Strings are
+ * designed as immutable and secure objects.
+ *
+ * @author dac@sun.com
+ * @author James Todd [gonzo@sun.com]
+ * @author Costin Manolache
+ * @author Remy Maucherat
+ */
+public final class CharChunk implements Cloneable, Serializable, CharSequence {
+
+    private static final long serialVersionUID = 1L;
+
+    // Input interface, used when the buffer is emptied.
+    public static interface CharInputChannel {
+        /**
+         * Read new bytes ( usually the internal conversion buffer ).
+         * The implementation is allowed to ignore the parameters,
+         * and mutate the chunk if it wishes to implement its own buffering.
+         */
+        public int realReadChars(char cbuf[], int off, int len)
+            throws IOException;
+    }
+    /**
+     *  When we need more space we'll either
+     *  grow the buffer ( up to the limit ) or send it to a channel.
+     */
+    public static interface CharOutputChannel {
+        /** Send the bytes ( usually the internal conversion buffer ).
+         *  Expect 8k output if the buffer is full.
+         */
+        public void realWriteChars(char cbuf[], int off, int len)
+            throws IOException;
+    }
+
+    // --------------------
+
+    private int hashCode = 0;
+    // did we compute the hashcode ?
+    private boolean hasHashCode = false;
+
+    // char[]
+    private char buff[];
+
+    private int start;
+    private int end;
+
+    private boolean isSet=false;  // XXX
+
+    // -1: grow indefinitely
+    // maximum amount to be cached
+    private int limit=-1;
+
+    private CharInputChannel in = null;
+    private CharOutputChannel out = null;
+
+    private boolean optimizedWrite=true;
+
+    /**
+     * Creates a new, uninitialized CharChunk object.
+     */
+    public CharChunk() {
+    }
+
+    public CharChunk(int size) {
+        allocate( size, -1 );
+    }
+
+    // --------------------
+
+    public boolean isNull() {
+        if( end > 0 ) {
+            return false;
+        }
+        return !isSet; //XXX
+    }
+
+    /**
+     * Resets the message bytes to an uninitialized state.
+     */
+    public void recycle() {
+        //        buff=null;
+        isSet=false; // XXX
+        hasHashCode = false;
+        start=0;
+        end=0;
+    }
+
+    // -------------------- Setup --------------------
+
+    public void allocate( int initial, int limit  ) {
+        if( buff==null || buff.length < initial ) {
+            buff=new char[initial];
+        }
+        this.limit=limit;
+        start=0;
+        end=0;
+        isSet=true;
+        hasHashCode = false;
+    }
+
+
+    public void setOptimizedWrite(boolean optimizedWrite) {
+        this.optimizedWrite = optimizedWrite;
+    }
+
+    public void setChars( char[] c, int off, int len ) {
+        buff=c;
+        start=off;
+        end=start + len;
+        isSet=true;
+        hasHashCode = false;
+    }
+
+    /** Maximum amount of data in this buffer.
+     *
+     *  If -1 or not set, the buffer will grow indefinitely.
+     *  Can be smaller than the current buffer size ( which will not shrink ).
+     *  When the limit is reached, the buffer will be flushed ( if out is set )
+     *  or throw exception.
+     */
+    public void setLimit(int limit) {
+        this.limit=limit;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    /**
+     * When the buffer is empty, read the data from the input channel.
+     */
+    public void setCharInputChannel(CharInputChannel in) {
+        this.in = in;
+    }
+
+    /** When the buffer is full, write the data to the output channel.
+     *         Also used when large amount of data is appended.
+     *
+     *  If not set, the buffer will grow to the limit.
+     */
+    public void setCharOutputChannel(CharOutputChannel out) {
+        this.out=out;
+    }
+
+    // compat
+    public char[] getChars()
+    {
+        return getBuffer();
+    }
+
+    public char[] getBuffer()
+    {
+        return buff;
+    }
+
+    /**
+     * Returns the start offset of the bytes.
+     * For output this is the end of the buffer.
+     */
+    public int getStart() {
+        return start;
+    }
+
+    public int getOffset() {
+        return start;
+    }
+
+    /**
+     * Returns the start offset of the bytes.
+     */
+    public void setOffset(int off) {
+        start=off;
+    }
+
+    /**
+     * Returns the length of the bytes.
+     */
+    public int getLength() {
+        return end-start;
+    }
+
+
+    public int getEnd() {
+        return end;
+    }
+
+    public void setEnd( int i ) {
+        end=i;
+    }
+
+    // -------------------- Adding data --------------------
+
+    public void append( char b )
+        throws IOException
+    {
+        makeSpace( 1 );
+
+        // couldn't make space
+        if( limit >0 && end >= limit ) {
+            flushBuffer();
+        }
+        buff[end++]=b;
+    }
+
+    public void append( CharChunk src )
+        throws IOException
+    {
+        append( src.getBuffer(), src.getOffset(), src.getLength());
+    }
+
+    /** Add data to the buffer
+     */
+    public void append( char src[], int off, int len )
+        throws IOException
+    {
+        // will grow, up to limit
+        makeSpace( len );
+
+        // if we don't have limit: makeSpace can grow as it wants
+        if( limit < 0 ) {
+            // assert: makeSpace made enough space
+            System.arraycopy( src, off, buff, end, len );
+            end+=len;
+            return;
+        }
+
+        // Optimize on a common case.
+        // If the source is going to fill up all the space in buffer, may
+        // as well write it directly to the output, and avoid an extra copy
+        if ( optimizedWrite && len == limit && end == start && out != null ) {
+            out.realWriteChars( src, off, len );
+            return;
+        }
+
+        // if we have limit and we're below
+        if( len <= limit - end ) {
+            // makeSpace will grow the buffer to the limit,
+            // so we have space
+            System.arraycopy( src, off, buff, end, len );
+
+            end+=len;
+            return;
+        }
+
+        // need more space than we can afford, need to flush
+        // buffer
+
+        // the buffer is already at ( or bigger than ) limit
+
+        // Optimization:
+        // If len-avail < length ( i.e. after we fill the buffer with
+        // what we can, the remaining will fit in the buffer ) we'll just
+        // copy the first part, flush, then copy the second part - 1 write
+        // and still have some space for more. We'll still have 2 writes, but
+        // we write more on the first.
+
+        if( len + end < 2 * limit ) {
+            /* If the request length exceeds the size of the output buffer,
+               flush the output buffer and then write the data directly.
+               We can't avoid 2 writes, but we can write more on the second
+            */
+            int avail=limit-end;
+            System.arraycopy(src, off, buff, end, avail);
+            end += avail;
+
+            flushBuffer();
+
+            System.arraycopy(src, off+avail, buff, end, len - avail);
+            end+= len - avail;
+
+        } else {        // len > buf.length + avail
+            // long write - flush the buffer and write the rest
+            // directly from source
+            flushBuffer();
+
+            out.realWriteChars( src, off, len );
+        }
+    }
+
+
+    /** Append a string to the buffer
+     */
+    public void append(String s) throws IOException {
+        append(s, 0, s.length());
+    }
+
+    /** Append a string to the buffer
+     */
+    public void append(String s, int off, int len) throws IOException {
+        if (s==null) {
+            return;
+        }
+
+        // will grow, up to limit
+        makeSpace( len );
+
+        // if we don't have limit: makeSpace can grow as it wants
+        if( limit < 0 ) {
+            // assert: makeSpace made enough space
+            s.getChars(off, off+len, buff, end );
+            end+=len;
+            return;
+        }
+
+        int sOff = off;
+        int sEnd = off + len;
+        while (sOff < sEnd) {
+            int d = min(limit - end, sEnd - sOff);
+            s.getChars( sOff, sOff+d, buff, end);
+            sOff += d;
+            end += d;
+            if (end >= limit) {
+                flushBuffer();
+            }
+        }
+    }
+
+    // -------------------- Removing data from the buffer --------------------
+
+    public int substract()
+        throws IOException {
+
+        if ((end - start) == 0) {
+            if (in == null) {
+                return -1;
+            }
+            int n = in.realReadChars(buff, end, buff.length - end);
+            if (n < 0) {
+                return -1;
+            }
+        }
+
+        return (buff[start++]);
+
+    }
+
+    public int substract( char src[], int off, int len )
+        throws IOException {
+
+        if ((end - start) == 0) {
+            if (in == null) {
+                return -1;
+            }
+            int n = in.realReadChars( buff, end, buff.length - end);
+            if (n < 0) {
+                return -1;
+            }
+        }
+
+        int n = len;
+        if (len > getLength()) {
+            n = getLength();
+        }
+        System.arraycopy(buff, start, src, off, n);
+        start += n;
+        return n;
+
+    }
+
+
+    public void flushBuffer()
+        throws IOException
+    {
+        //assert out!=null
+        if( out==null ) {
+            throw new IOException( "Buffer overflow, no sink " + limit + " " +
+                                   buff.length  );
+        }
+        out.realWriteChars( buff, start, end - start );
+        end=start;
+    }
+
+    /** Make space for len chars. If len is small, allocate
+     *        a reserve space too. Never grow bigger than limit.
+     */
+    public void makeSpace(int count)
+    {
+        char[] tmp = null;
+
+        int newSize;
+        int desiredSize=end + count;
+
+        // Can't grow above the limit
+        if( limit > 0 &&
+            desiredSize > limit) {
+            desiredSize=limit;
+        }
+
+        if( buff==null ) {
+            if( desiredSize < 256 )
+             {
+                desiredSize=256; // take a minimum
+            }
+            buff=new char[desiredSize];
+        }
+
+        // limit < buf.length ( the buffer is already big )
+        // or we already have space XXX
+        if( desiredSize <= buff.length) {
+            return;
+        }
+        // grow in larger chunks
+        if( desiredSize < 2 * buff.length ) {
+            newSize= buff.length * 2;
+            if( limit >0 &&
+                newSize > limit ) {
+                newSize=limit;
+            }
+            tmp=new char[newSize];
+        } else {
+            newSize= buff.length * 2 + count ;
+            if( limit > 0 &&
+                newSize > limit ) {
+                newSize=limit;
+            }
+            tmp=new char[newSize];
+        }
+
+        System.arraycopy(buff, 0, tmp, 0, end);
+        buff = tmp;
+        tmp = null;
+    }
+
+    // -------------------- Conversion and getters --------------------
+
+    @Override
+    public String toString() {
+        if (null == buff) {
+            return null;
+        } else if (end-start == 0) {
+            return "";
+        }
+        return StringCache.toString(this);
+    }
+
+    public String toStringInternal() {
+        return new String(buff, start, end-start);
+    }
+
+    // -------------------- equals --------------------
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof CharChunk) {
+            return equals((CharChunk) obj);
+        }
+        return false;
+    }
+
+    /**
+     * Compares the message bytes to the specified String object.
+     * @param s the String to compare
+     * @return true if the comparison succeeded, false otherwise
+     */
+    public boolean equals(String s) {
+        char[] c = buff;
+        int len = end-start;
+        if (c == null || len != s.length()) {
+            return false;
+        }
+        int off = start;
+        for (int i = 0; i < len; i++) {
+            if (c[off++] != s.charAt(i)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Compares the message bytes to the specified String object.
+     * @param s the String to compare
+     * @return true if the comparison succeeded, false otherwise
+     */
+    public boolean equalsIgnoreCase(String s) {
+        char[] c = buff;
+        int len = end-start;
+        if (c == null || len != s.length()) {
+            return false;
+        }
+        int off = start;
+        for (int i = 0; i < len; i++) {
+            if (Ascii.toLower( c[off++] ) != Ascii.toLower( s.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public boolean equals(CharChunk cc) {
+        return equals( cc.getChars(), cc.getOffset(), cc.getLength());
+    }
+
+    public boolean equals(char b2[], int off2, int len2) {
+        char b1[]=buff;
+        if( b1==null && b2==null ) {
+            return true;
+        }
+
+        if (b1== null || b2==null || end-start != len2) {
+            return false;
+        }
+        int off1 = start;
+        int len=end-start;
+        while ( len-- > 0) {
+            if (b1[off1++] != b2[off2++]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns true if the message bytes starts with the specified string.
+     * @param s the string
+     */
+    public boolean startsWith(String s) {
+        char[] c = buff;
+        int len = s.length();
+        if (c == null || len > end-start) {
+            return false;
+        }
+        int off = start;
+        for (int i = 0; i < len; i++) {
+            if (c[off++] != s.charAt(i)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns true if the message bytes starts with the specified string.
+     * @param s the string
+     */
+    public boolean startsWithIgnoreCase(String s, int pos) {
+        char[] c = buff;
+        int len = s.length();
+        if (c == null || len+pos > end-start) {
+            return false;
+        }
+        int off = start+pos;
+        for (int i = 0; i < len; i++) {
+            if (Ascii.toLower( c[off++] ) != Ascii.toLower( s.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    /**
+     * Returns true if the message bytes end with the specified string.
+     * @param s the string
+     */
+    public boolean endsWith(String s) {
+        char[] c = buff;
+        int len = s.length();
+        if (c == null || len > end-start) {
+            return false;
+        }
+        int off = end - len;
+        for (int i = 0; i < len; i++) {
+            if (c[off++] != s.charAt(i)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    // -------------------- Hash code  --------------------
+
+    @Override
+    public int hashCode() {
+        if (hasHashCode) {
+            return hashCode;
+        }
+        int code = 0;
+
+        code = hash();
+        hashCode = code;
+        hasHashCode = true;
+        return code;
+    }
+
+    // normal hash.
+    public int hash() {
+        int code=0;
+        for (int i = start; i < start + end-start; i++) {
+            code = code * 37 + buff[i];
+        }
+        return code;
+    }
+
+    public int indexOf(char c) {
+        return indexOf( c, start);
+    }
+
+    /**
+     * Returns true if the message bytes starts with the specified string.
+     * @param c the character
+     */
+    public int indexOf(char c, int starting) {
+        int ret = indexOf( buff, start+starting, end, c );
+        return (ret >= start) ? ret - start : -1;
+    }
+
+    public static int indexOf( char chars[], int off, int cend, char qq )
+    {
+        while( off < cend ) {
+            char b=chars[off];
+            if( b==qq ) {
+                return off;
+            }
+            off++;
+        }
+        return -1;
+    }
+
+
+    public int indexOf(String src, int srcOff, int srcLen, int myOff ) {
+        char first=src.charAt( srcOff );
+
+        // Look for first char
+        int srcEnd = srcOff + srcLen;
+
+        for( int i=myOff+start; i <= (end - srcLen); i++ ) {
+            if( buff[i] != first ) {
+                continue;
+            }
+            // found first char, now look for a match
+            int myPos=i+1;
+            for( int srcPos=srcOff + 1; srcPos< srcEnd;) {
+                if( buff[myPos++] != src.charAt( srcPos++ )) {
+                    break;
+                }
+                if( srcPos==srcEnd )
+                 {
+                    return i-start; // found it
+                }
+            }
+        }
+        return -1;
+    }
+
+    // -------------------- utils
+    private int min(int a, int b) {
+        if (a < b) {
+            return a;
+        }
+        return b;
+    }
+
+    // Char sequence impl
+
+    public char charAt(int index) {
+        return buff[index + start];
+    }
+
+    public CharSequence subSequence(int start, int end) {
+        try {
+            CharChunk result = (CharChunk) this.clone();
+            result.setOffset(this.start + start);
+            result.setEnd(this.start + end);
+            return result;
+        } catch (CloneNotSupportedException e) {
+            // Cannot happen
+            return null;
+        }
+    }
+
+    public int length() {
+        return end - start;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/HexUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/HexUtils.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/HexUtils.java
new file mode 100644
index 0000000..0b9a116
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/HexUtils.java
@@ -0,0 +1,113 @@
+/*
+ *  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.util.tomcat.buf;
+
+/**
+ * Tables useful when converting byte arrays to and from strings of hexadecimal
+ * digits.
+ * Code from Ajp11, from Apache's JServ.
+ *
+ * @author Craig R. McClanahan
+ */
+public final class HexUtils {
+
+    // -------------------------------------------------------------- Constants
+
+    /**
+     *  Table for HEX to DEC byte translation.
+     */
+    private static final int[] DEC = {
+        00, 01, 02, 03, 04, 05, 06, 07,  8,  9, -1, -1, -1, -1, -1, -1,
+        -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, 10, 11, 12, 13, 14, 15,
+    };
+
+
+    /**
+     * Table for DEC to HEX byte translation.
+     */
+    private static final byte[] HEX =
+    { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5',
+      (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b',
+      (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' };
+
+
+    /**
+     * Table for byte to hex string translation.
+     */
+    private static final char[] hex = "0123456789abcdef".toCharArray();
+
+
+    // --------------------------------------------------------- Static Methods
+
+    public static int getDec(int index) {
+        // Fast for correct values, slower for incorrect ones
+        try {
+            return DEC[index - '0'];
+        } catch (ArrayIndexOutOfBoundsException ex) {
+            return -1;
+        }
+    }
+
+
+    public static byte getHex(int index) {
+        return HEX[index];
+    }
+
+
+    public static String toHexString(byte[] bytes) {
+        if (null == bytes) {
+            return null;
+        }
+
+        StringBuilder sb = new StringBuilder(bytes.length << 1);
+
+        for(int i = 0; i < bytes.length; ++i) {
+            sb.append(hex[(bytes[i] & 0xf0) >> 4])
+                .append(hex[(bytes[i] & 0x0f)])
+                ;
+        }
+
+        return sb.toString();
+    }
+
+
+    public static byte[] fromHexString(String input) {
+        if (input == null) {
+            return null;
+        }
+
+        if ((input.length() & 1) == 1) {
+            // Odd number of characters
+            throw new IllegalArgumentException("The input must consist of an even number of hex digits");
+        }
+
+        char[] inputChars = input.toCharArray();
+        byte[] result = new byte[input.length() >> 1];
+        for (int i = 0; i < result.length; i++) {
+            int upperNibble = getDec(inputChars[2*i]);
+            int lowerNibble =  getDec(inputChars[2*i + 1]);
+            if (upperNibble < 0 || lowerNibble < 0) {
+                // Non hex character
+                throw new IllegalArgumentException("The input must consist only of hex digits");
+            }
+            result[i] = (byte) ((upperNibble << 4) + lowerNibble);
+        }
+        return result;
+    }
+}


[32/50] [abbrv] struts git commit: WW-4507 - clone Tomcat UDecoder and use it for in query string handling (cherry picked from commit 5421930)

Posted by lu...@apache.org.
http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/MessageBytes.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/MessageBytes.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/MessageBytes.java
new file mode 100644
index 0000000..df07284
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/MessageBytes.java
@@ -0,0 +1,546 @@
+/*
+ *  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.util.tomcat.buf;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.Locale;
+
+/**
+ * This class is used to represent a subarray of bytes in an HTTP message.
+ * It represents all request/response elements. The byte/char conversions are
+ * delayed and cached. Everything is recyclable.
+ *
+ * The object can represent a byte[], a char[], or a (sub) String. All
+ * operations can be made in case sensitive mode or not.
+ *
+ * @author dac@eng.sun.com
+ * @author James Todd [gonzo@eng.sun.com]
+ * @author Costin Manolache
+ */
+public final class MessageBytes implements Cloneable, Serializable {
+    private static final long serialVersionUID = 1L;
+
+    // primary type ( whatever is set as original value )
+    private int type = T_NULL;
+
+    public static final int T_NULL = 0;
+    /** getType() is T_STR if the the object used to create the MessageBytes
+        was a String */
+    public static final int T_STR  = 1;
+    /** getType() is T_STR if the the object used to create the MessageBytes
+        was a byte[] */
+    public static final int T_BYTES = 2;
+    /** getType() is T_STR if the the object used to create the MessageBytes
+        was a char[] */
+    public static final int T_CHARS = 3;
+
+    private int hashCode=0;
+    // did we compute the hashcode ?
+    private boolean hasHashCode=false;
+
+    // Internal objects to represent array + offset, and specific methods
+    private final ByteChunk byteC=new ByteChunk();
+    private final CharChunk charC=new CharChunk();
+
+    // String
+    private String strValue;
+    // true if a String value was computed. Probably not needed,
+    // strValue!=null is the same
+    private boolean hasStrValue=false;
+
+    /**
+     * Creates a new, uninitialized MessageBytes object.
+     * Use static newInstance() in order to allow
+     *   future hooks.
+     */
+    private MessageBytes() {
+    }
+
+    /** Construct a new MessageBytes instance
+     */
+    public static MessageBytes newInstance() {
+        return factory.newInstance();
+    }
+
+    public boolean isNull() {
+        // should we check also hasStrValue ???
+        return byteC.isNull() && charC.isNull() && ! hasStrValue;
+        // bytes==null && strValue==null;
+    }
+
+    /**
+     * Resets the message bytes to an uninitialized (NULL) state.
+     */
+    public void recycle() {
+        type=T_NULL;
+        byteC.recycle();
+        charC.recycle();
+
+        strValue=null;
+
+        hasStrValue=false;
+        hasHashCode=false;
+        hasLongValue=false;
+    }
+
+
+    /**
+     * Sets the content to the specified subarray of bytes.
+     *
+     * @param b the bytes
+     * @param off the start offset of the bytes
+     * @param len the length of the bytes
+     */
+    public void setBytes(byte[] b, int off, int len) {
+        byteC.setBytes( b, off, len );
+        type=T_BYTES;
+        hasStrValue=false;
+        hasHashCode=false;
+        hasLongValue=false;
+    }
+
+    /**
+     * Sets the content to be a char[]
+     *
+     * @param c the bytes
+     * @param off the start offset of the bytes
+     * @param len the length of the bytes
+     */
+    public void setChars( char[] c, int off, int len ) {
+        charC.setChars( c, off, len );
+        type=T_CHARS;
+        hasStrValue=false;
+        hasHashCode=false;
+        hasLongValue=false;
+    }
+
+    /**
+     * Set the content to be a string
+     */
+    public void setString( String s ) {
+        strValue=s;
+        hasHashCode=false;
+        hasLongValue=false;
+        if (s == null) {
+            hasStrValue=false;
+            type=T_NULL;
+        } else {
+            hasStrValue=true;
+            type=T_STR;
+        }
+    }
+
+    // -------------------- Conversion and getters --------------------
+
+    /** Compute the string value
+     */
+    @Override
+    public String toString() {
+        if( hasStrValue ) {
+            return strValue;
+        }
+
+        switch (type) {
+        case T_CHARS:
+            strValue=charC.toString();
+            hasStrValue=true;
+            return strValue;
+        case T_BYTES:
+            strValue=byteC.toString();
+            hasStrValue=true;
+            return strValue;
+        }
+        return null;
+    }
+
+    //----------------------------------------
+    /** Return the type of the original content. Can be
+     *  T_STR, T_BYTES, T_CHARS or T_NULL
+     */
+    public int getType() {
+        return type;
+    }
+
+    /**
+     * Returns the byte chunk, representing the byte[] and offset/length.
+     * Valid only if T_BYTES or after a conversion was made.
+     */
+    public ByteChunk getByteChunk() {
+        return byteC;
+    }
+
+    /**
+     * Returns the char chunk, representing the char[] and offset/length.
+     * Valid only if T_CHARS or after a conversion was made.
+     */
+    public CharChunk getCharChunk() {
+        return charC;
+    }
+
+    /**
+     * Returns the string value.
+     * Valid only if T_STR or after a conversion was made.
+     */
+    public String getString() {
+        return strValue;
+    }
+
+    /**
+     * Get the Charset used for string&lt;-&gt;byte conversions.
+     */
+    public Charset getCharset() {
+        return byteC.getCharset();
+    }
+
+    /**
+     * Set the Charset used for string&lt;-&gt;byte conversions.
+     */
+    public void setCharset(Charset charset) {
+        byteC.setCharset(charset);
+    }
+
+    /** Do a char-&gt;byte conversion.
+     */
+    public void toBytes() {
+        if (!byteC.isNull()) {
+            type=T_BYTES;
+            return;
+        }
+        toString();
+        type=T_BYTES;
+        Charset charset = byteC.getCharset();
+        ByteBuffer result = charset.encode(strValue);
+        byteC.setBytes(result.array(), result.arrayOffset(), result.limit());
+    }
+
+    /** Convert to char[] and fill the CharChunk.
+     *  XXX Not optimized - it converts to String first.
+     */
+    public void toChars() {
+        if( ! charC.isNull() ) {
+            type=T_CHARS;
+            return;
+        }
+        // inefficient
+        toString();
+        type=T_CHARS;
+        char cc[]=strValue.toCharArray();
+        charC.setChars(cc, 0, cc.length);
+    }
+
+
+    /**
+     * Returns the length of the original buffer.
+     * Note that the length in bytes may be different from the length
+     * in chars.
+     */
+    public int getLength() {
+        if(type==T_BYTES) {
+            return byteC.getLength();
+        }
+        if(type==T_CHARS) {
+            return charC.getLength();
+        }
+        if(type==T_STR) {
+            return strValue.length();
+        }
+        toString();
+        if( strValue==null ) {
+            return 0;
+        }
+        return strValue.length();
+    }
+
+    // -------------------- equals --------------------
+
+    /**
+     * Compares the message bytes to the specified String object.
+     * @param s the String to compare
+     * @return true if the comparison succeeded, false otherwise
+     */
+    public boolean equals(String s) {
+        switch (type) {
+        case T_STR:
+            if (strValue == null) {
+                return s == null;
+            }
+            return strValue.equals( s );
+        case T_CHARS:
+            return charC.equals( s );
+        case T_BYTES:
+            return byteC.equals( s );
+        default:
+            return false;
+        }
+    }
+
+    /**
+     * Compares the message bytes to the specified String object.
+     * @param s the String to compare
+     * @return true if the comparison succeeded, false otherwise
+     */
+    public boolean equalsIgnoreCase(String s) {
+        switch (type) {
+        case T_STR:
+            if (strValue == null) {
+                return s == null;
+            }
+            return strValue.equalsIgnoreCase( s );
+        case T_CHARS:
+            return charC.equalsIgnoreCase( s );
+        case T_BYTES:
+            return byteC.equalsIgnoreCase( s );
+        default:
+            return false;
+        }
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof MessageBytes) {
+            return equals((MessageBytes) obj);
+        }
+        return false;
+    }
+
+    public boolean equals(MessageBytes mb) {
+        switch (type) {
+        case T_STR:
+            return mb.equals( strValue );
+        }
+
+        if( mb.type != T_CHARS &&
+            mb.type!= T_BYTES ) {
+            // it's a string or int/date string value
+            return equals( mb.toString() );
+        }
+
+        // mb is either CHARS or BYTES.
+        // this is either CHARS or BYTES
+        // Deal with the 4 cases ( in fact 3, one is symmetric)
+
+        if( mb.type == T_CHARS && type==T_CHARS ) {
+            return charC.equals( mb.charC );
+        }
+        if( mb.type==T_BYTES && type== T_BYTES ) {
+            return byteC.equals( mb.byteC );
+        }
+        if( mb.type== T_CHARS && type== T_BYTES ) {
+            return byteC.equals( mb.charC );
+        }
+        if( mb.type== T_BYTES && type== T_CHARS ) {
+            return mb.byteC.equals( charC );
+        }
+        // can't happen
+        return true;
+    }
+
+
+    /**
+     * Returns true if the message bytes starts with the specified string.
+     * @param s the string
+     * @param pos The start position
+     */
+    public boolean startsWithIgnoreCase(String s, int pos) {
+        switch (type) {
+        case T_STR:
+            if( strValue==null ) {
+                return false;
+            }
+            if( strValue.length() < pos + s.length() ) {
+                return false;
+            }
+
+            for( int i=0; i<s.length(); i++ ) {
+                if( Ascii.toLower( s.charAt( i ) ) !=
+                    Ascii.toLower( strValue.charAt( pos + i ))) {
+                    return false;
+                }
+            }
+            return true;
+        case T_CHARS:
+            return charC.startsWithIgnoreCase( s, pos );
+        case T_BYTES:
+            return byteC.startsWithIgnoreCase( s, pos );
+        default:
+            return false;
+        }
+    }
+
+
+    // -------------------- Hash code  --------------------
+    @Override
+    public  int hashCode() {
+        if( hasHashCode ) {
+            return hashCode;
+        }
+        int code = 0;
+
+        code=hash();
+        hashCode=code;
+        hasHashCode=true;
+        return code;
+    }
+
+    // normal hash.
+    private int hash() {
+        int code=0;
+        switch (type) {
+        case T_STR:
+            // We need to use the same hash function
+            for (int i = 0; i < strValue.length(); i++) {
+                code = code * 37 + strValue.charAt( i );
+            }
+            return code;
+        case T_CHARS:
+            return charC.hash();
+        case T_BYTES:
+            return byteC.hash();
+        default:
+            return 0;
+        }
+    }
+
+    // Inefficient initial implementation. Will be replaced on the next
+    // round of tune-up
+    public int indexOf(String s, int starting) {
+        toString();
+        return strValue.indexOf( s, starting );
+    }
+
+    // Inefficient initial implementation. Will be replaced on the next
+    // round of tune-up
+    public int indexOf(String s) {
+        return indexOf( s, 0 );
+    }
+
+    public int indexOfIgnoreCase(String s, int starting) {
+        toString();
+        String upper=strValue.toUpperCase(Locale.ENGLISH);
+        String sU=s.toUpperCase(Locale.ENGLISH);
+        return upper.indexOf( sU, starting );
+    }
+
+    /** Copy the src into this MessageBytes, allocating more space if
+     *  needed
+     */
+    public void duplicate( MessageBytes src ) throws IOException
+    {
+        switch( src.getType() ) {
+        case MessageBytes.T_BYTES:
+            type=T_BYTES;
+            ByteChunk bc=src.getByteChunk();
+            byteC.allocate( 2 * bc.getLength(), -1 );
+            byteC.append( bc );
+            break;
+        case MessageBytes.T_CHARS:
+            type=T_CHARS;
+            CharChunk cc=src.getCharChunk();
+            charC.allocate( 2 * cc.getLength(), -1 );
+            charC.append( cc );
+            break;
+        case MessageBytes.T_STR:
+            type=T_STR;
+            String sc=src.getString();
+            this.setString( sc );
+            break;
+        }
+    }
+
+    // -------------------- Deprecated code --------------------
+    // efficient long
+    // XXX used only for headers - shouldn't be stored here.
+    private long longValue;
+    private boolean hasLongValue=false;
+
+    /** Set the buffer to the representation of an long
+     */
+    public void setLong(long l) {
+        byteC.allocate(32, 64);
+        long current = l;
+        byte[] buf = byteC.getBuffer();
+        int start = 0;
+        int end = 0;
+        if (l == 0) {
+            buf[end++] = (byte) '0';
+        }
+        if (l < 0) {
+            current = -l;
+            buf[end++] = (byte) '-';
+        }
+        while (current > 0) {
+            int digit = (int) (current % 10);
+            current = current / 10;
+            buf[end++] = HexUtils.getHex(digit);
+        }
+        byteC.setOffset(0);
+        byteC.setEnd(end);
+        // Inverting buffer
+        end--;
+        if (l < 0) {
+            start++;
+        }
+        while (end > start) {
+            byte temp = buf[start];
+            buf[start] = buf[end];
+            buf[end] = temp;
+            start++;
+            end--;
+        }
+        longValue=l;
+        hasStrValue=false;
+        hasHashCode=false;
+        hasLongValue=true;
+        type=T_BYTES;
+    }
+
+    // Used for headers conversion
+    /** Convert the buffer to an long, cache the value
+     */
+    public long getLong() {
+        if( hasLongValue ) {
+            return longValue;
+        }
+
+        switch (type) {
+        case T_BYTES:
+            longValue=byteC.getLong();
+            break;
+        default:
+            longValue= Long.parseLong(toString());
+        }
+
+        hasLongValue=true;
+        return longValue;
+
+     }
+
+    // -------------------- Future may be different --------------------
+
+    private static final MessageBytesFactory factory=new MessageBytesFactory();
+
+    private static class MessageBytesFactory {
+        protected MessageBytesFactory() {
+        }
+        public MessageBytes newInstance() {
+            return new MessageBytes();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
new file mode 100644
index 0000000..3a72d49
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/StringCache.java
@@ -0,0 +1,695 @@
+/*
+ *  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.util.tomcat.buf;
+
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+/**
+ * This class implements a String cache for ByteChunk and CharChunk.
+ *
+ * @author Remy Maucherat
+ */
+public class StringCache {
+
+
+    private static final Logger log = LoggerFactory.getLogger(StringCache.class);
+
+
+    // ------------------------------------------------------- Static Variables
+
+
+    /**
+     * Enabled ?
+     */
+    protected static boolean byteEnabled = ("true".equals(System.getProperty(
+            "tomcat.util.buf.StringCache.byte.enabled", "false")));
+
+
+    protected static boolean charEnabled = ("true".equals(System.getProperty(
+            "tomcat.util.buf.StringCache.char.enabled", "false")));
+
+
+    protected static int trainThreshold = Integer.parseInt(System.getProperty(
+            "tomcat.util.buf.StringCache.trainThreshold", "20000"));
+
+
+    protected static int cacheSize = Integer.parseInt(System.getProperty(
+            "tomcat.util.buf.StringCache.cacheSize", "200"));
+
+
+    protected static final int maxStringSize =
+            Integer.parseInt(System.getProperty(
+                    "tomcat.util.buf.StringCache.maxStringSize", "128"));
+
+
+   /**
+     * Statistics hash map for byte chunk.
+     */
+    protected static final HashMap<ByteEntry,int[]> bcStats =
+            new HashMap<ByteEntry, int[]>(cacheSize);
+
+
+    /**
+     * toString count for byte chunk.
+     */
+    protected static int bcCount = 0;
+
+
+    /**
+     * Cache for byte chunk.
+     */
+    protected static ByteEntry[] bcCache = null;
+
+
+    /**
+     * Statistics hash map for char chunk.
+     */
+    protected static final HashMap<CharEntry,int[]> ccStats =
+            new HashMap<CharEntry, int[]>(cacheSize);
+
+
+    /**
+     * toString count for char chunk.
+     */
+    protected static int ccCount = 0;
+
+
+    /**
+     * Cache for char chunk.
+     */
+    protected static CharEntry[] ccCache = null;
+
+
+    /**
+     * Access count.
+     */
+    protected static int accessCount = 0;
+
+
+    /**
+     * Hit count.
+     */
+    protected static int hitCount = 0;
+
+
+    // ------------------------------------------------------------ Properties
+
+
+    /**
+     * @return Returns the cacheSize.
+     */
+    public int getCacheSize() {
+        return cacheSize;
+    }
+
+
+    /**
+     * @param cacheSize The cacheSize to set.
+     */
+    public void setCacheSize(int cacheSize) {
+        StringCache.cacheSize = cacheSize;
+    }
+
+
+    /**
+     * @return Returns the enabled.
+     */
+    public boolean getByteEnabled() {
+        return byteEnabled;
+    }
+
+
+    /**
+     * @param byteEnabled The enabled to set.
+     */
+    public void setByteEnabled(boolean byteEnabled) {
+        StringCache.byteEnabled = byteEnabled;
+    }
+
+
+    /**
+     * @return Returns the enabled.
+     */
+    public boolean getCharEnabled() {
+        return charEnabled;
+    }
+
+
+    /**
+     * @param charEnabled The enabled to set.
+     */
+    public void setCharEnabled(boolean charEnabled) {
+        StringCache.charEnabled = charEnabled;
+    }
+
+
+    /**
+     * @return Returns the trainThreshold.
+     */
+    public int getTrainThreshold() {
+        return trainThreshold;
+    }
+
+
+    /**
+     * @param trainThreshold The trainThreshold to set.
+     */
+    public void setTrainThreshold(int trainThreshold) {
+        StringCache.trainThreshold = trainThreshold;
+    }
+
+
+    /**
+     * @return Returns the accessCount.
+     */
+    public int getAccessCount() {
+        return accessCount;
+    }
+
+
+    /**
+     * @return Returns the hitCount.
+     */
+    public int getHitCount() {
+        return hitCount;
+    }
+
+
+    // -------------------------------------------------- Public Static Methods
+
+
+    public void reset() {
+        hitCount = 0;
+        accessCount = 0;
+        synchronized (bcStats) {
+            bcCache = null;
+            bcCount = 0;
+        }
+        synchronized (ccStats) {
+            ccCache = null;
+            ccCount = 0;
+        }
+    }
+
+
+    public static String toString(ByteChunk bc) {
+
+        // If the cache is null, then either caching is disabled, or we're
+        // still training
+        if (bcCache == null) {
+            String value = bc.toStringInternal();
+            if (byteEnabled && (value.length() < maxStringSize)) {
+                // If training, everything is synced
+                synchronized (bcStats) {
+                    // If the cache has been generated on a previous invocation
+                    // while waiting for the lock, just return the toString
+                    // value we just calculated
+                    if (bcCache != null) {
+                        return value;
+                    }
+                    // Two cases: either we just exceeded the train count, in
+                    // which case the cache must be created, or we just update
+                    // the count for the string
+                    if (bcCount > trainThreshold) {
+                        long t1 = System.currentTimeMillis();
+                        // Sort the entries according to occurrence
+                        TreeMap<Integer,ArrayList<ByteEntry>> tempMap =
+                                new TreeMap<Integer, ArrayList<ByteEntry>>();
+                        for (Entry<ByteEntry,int[]> item : bcStats.entrySet()) {
+                            ByteEntry entry = item.getKey();
+                            int[] countA = item.getValue();
+                            Integer count = Integer.valueOf(countA[0]);
+                            // Add to the list for that count
+                            ArrayList<ByteEntry> list = tempMap.get(count);
+                            if (list == null) {
+                                // Create list
+                                list = new ArrayList<ByteEntry>();
+                                tempMap.put(count, list);
+                            }
+                            list.add(entry);
+                        }
+                        // Allocate array of the right size
+                        int size = bcStats.size();
+                        if (size > cacheSize) {
+                            size = cacheSize;
+                        }
+                        ByteEntry[] tempbcCache = new ByteEntry[size];
+                        // Fill it up using an alphabetical order
+                        // and a dumb insert sort
+                        ByteChunk tempChunk = new ByteChunk();
+                        int n = 0;
+                        while (n < size) {
+                            Object key = tempMap.lastKey();
+                            ArrayList<ByteEntry> list = tempMap.get(key);
+                            for (int i = 0; i < list.size() && n < size; i++) {
+                                ByteEntry entry = list.get(i);
+                                tempChunk.setBytes(entry.name, 0,
+                                        entry.name.length);
+                                int insertPos = findClosest(tempChunk,
+                                        tempbcCache, n);
+                                if (insertPos == n) {
+                                    tempbcCache[n + 1] = entry;
+                                } else {
+                                    System.arraycopy(tempbcCache, insertPos + 1,
+                                            tempbcCache, insertPos + 2,
+                                            n - insertPos - 1);
+                                    tempbcCache[insertPos + 1] = entry;
+                                }
+                                n++;
+                            }
+                            tempMap.remove(key);
+                        }
+                        bcCount = 0;
+                        bcStats.clear();
+                        bcCache = tempbcCache;
+                        if (log.isDebugEnabled()) {
+                            long t2 = System.currentTimeMillis();
+                            log.debug("ByteCache generation time: " +
+                                    (t2 - t1) + "ms");
+                        }
+                    } else {
+                        bcCount++;
+                        // Allocate new ByteEntry for the lookup
+                        ByteEntry entry = new ByteEntry();
+                        entry.value = value;
+                        int[] count = bcStats.get(entry);
+                        if (count == null) {
+                            int end = bc.getEnd();
+                            int start = bc.getStart();
+                            // Create byte array and copy bytes
+                            entry.name = new byte[bc.getLength()];
+                            System.arraycopy(bc.getBuffer(), start, entry.name,
+                                    0, end - start);
+                            // Set encoding
+                            entry.charset = bc.getCharset();
+                            // Initialize occurrence count to one
+                            count = new int[1];
+                            count[0] = 1;
+                            // Set in the stats hash map
+                            bcStats.put(entry, count);
+                        } else {
+                            count[0] = count[0] + 1;
+                        }
+                    }
+                }
+            }
+            return value;
+        } else {
+            accessCount++;
+            // Find the corresponding String
+            String result = find(bc);
+            if (result == null) {
+                return bc.toStringInternal();
+            }
+            // Note: We don't care about safety for the stats
+            hitCount++;
+            return result;
+        }
+
+    }
+
+
+    public static String toString(CharChunk cc) {
+
+        // If the cache is null, then either caching is disabled, or we're
+        // still training
+        if (ccCache == null) {
+            String value = cc.toStringInternal();
+            if (charEnabled && (value.length() < maxStringSize)) {
+                // If training, everything is synced
+                synchronized (ccStats) {
+                    // If the cache has been generated on a previous invocation
+                    // while waiting for the lock, just return the toString
+                    // value we just calculated
+                    if (ccCache != null) {
+                        return value;
+                    }
+                    // Two cases: either we just exceeded the train count, in
+                    // which case the cache must be created, or we just update
+                    // the count for the string
+                    if (ccCount > trainThreshold) {
+                        long t1 = System.currentTimeMillis();
+                        // Sort the entries according to occurrence
+                        TreeMap<Integer,ArrayList<CharEntry>> tempMap =
+                                new TreeMap<Integer, ArrayList<CharEntry>>();
+                        for (Entry<CharEntry,int[]> item : ccStats.entrySet()) {
+                            CharEntry entry = item.getKey();
+                            int[] countA = item.getValue();
+                            Integer count = Integer.valueOf(countA[0]);
+                            // Add to the list for that count
+                            ArrayList<CharEntry> list = tempMap.get(count);
+                            if (list == null) {
+                                // Create list
+                                list = new ArrayList<CharEntry>();
+                                tempMap.put(count, list);
+                            }
+                            list.add(entry);
+                        }
+                        // Allocate array of the right size
+                        int size = ccStats.size();
+                        if (size > cacheSize) {
+                            size = cacheSize;
+                        }
+                        CharEntry[] tempccCache = new CharEntry[size];
+                        // Fill it up using an alphabetical order
+                        // and a dumb insert sort
+                        CharChunk tempChunk = new CharChunk();
+                        int n = 0;
+                        while (n < size) {
+                            Object key = tempMap.lastKey();
+                            ArrayList<CharEntry> list = tempMap.get(key);
+                            for (int i = 0; i < list.size() && n < size; i++) {
+                                CharEntry entry = list.get(i);
+                                tempChunk.setChars(entry.name, 0,
+                                        entry.name.length);
+                                int insertPos = findClosest(tempChunk,
+                                        tempccCache, n);
+                                if (insertPos == n) {
+                                    tempccCache[n + 1] = entry;
+                                } else {
+                                    System.arraycopy(tempccCache, insertPos + 1,
+                                            tempccCache, insertPos + 2,
+                                            n - insertPos - 1);
+                                    tempccCache[insertPos + 1] = entry;
+                                }
+                                n++;
+                            }
+                            tempMap.remove(key);
+                        }
+                        ccCount = 0;
+                        ccStats.clear();
+                        ccCache = tempccCache;
+                        if (log.isDebugEnabled()) {
+                            long t2 = System.currentTimeMillis();
+                            log.debug("CharCache generation time: " +
+                                    (t2 - t1) + "ms");
+                        }
+                    } else {
+                        ccCount++;
+                        // Allocate new CharEntry for the lookup
+                        CharEntry entry = new CharEntry();
+                        entry.value = value;
+                        int[] count = ccStats.get(entry);
+                        if (count == null) {
+                            int end = cc.getEnd();
+                            int start = cc.getStart();
+                            // Create char array and copy chars
+                            entry.name = new char[cc.getLength()];
+                            System.arraycopy(cc.getBuffer(), start, entry.name,
+                                    0, end - start);
+                            // Initialize occurrence count to one
+                            count = new int[1];
+                            count[0] = 1;
+                            // Set in the stats hash map
+                            ccStats.put(entry, count);
+                        } else {
+                            count[0] = count[0] + 1;
+                        }
+                    }
+                }
+            }
+            return value;
+        } else {
+            accessCount++;
+            // Find the corresponding String
+            String result = find(cc);
+            if (result == null) {
+                return cc.toStringInternal();
+            }
+            // Note: We don't care about safety for the stats
+            hitCount++;
+            return result;
+        }
+
+    }
+
+
+    // ----------------------------------------------------- Protected Methods
+
+
+    /**
+     * Compare given byte chunk with byte array.
+     * Return -1, 0 or +1 if inferior, equal, or superior to the String.
+     */
+    protected static final int compare(ByteChunk name, byte[] compareTo) {
+        int result = 0;
+
+        byte[] b = name.getBuffer();
+        int start = name.getStart();
+        int end = name.getEnd();
+        int len = compareTo.length;
+
+        if ((end - start) < len) {
+            len = end - start;
+        }
+        for (int i = 0; (i < len) && (result == 0); i++) {
+            if (b[i + start] > compareTo[i]) {
+                result = 1;
+            } else if (b[i + start] < compareTo[i]) {
+                result = -1;
+            }
+        }
+        if (result == 0) {
+            if (compareTo.length > (end - start)) {
+                result = -1;
+            } else if (compareTo.length < (end - start)) {
+                result = 1;
+            }
+        }
+        return result;
+    }
+
+
+    /**
+     * Find an entry given its name in the cache and return the associated
+     * String.
+     */
+    protected static final String find(ByteChunk name) {
+        int pos = findClosest(name, bcCache, bcCache.length);
+        if ((pos < 0) || (compare(name, bcCache[pos].name) != 0)
+                || !(name.getCharset().equals(bcCache[pos].charset))) {
+            return null;
+        } else {
+            return bcCache[pos].value;
+        }
+    }
+
+
+    /**
+     * Find an entry given its name in a sorted array of map elements.
+     * This will return the index for the closest inferior or equal item in the
+     * given array.
+     */
+    protected static final int findClosest(ByteChunk name, ByteEntry[] array,
+            int len) {
+
+        int a = 0;
+        int b = len - 1;
+
+        // Special cases: -1 and 0
+        if (b == -1) {
+            return -1;
+        }
+
+        if (compare(name, array[0].name) < 0) {
+            return -1;
+        }
+        if (b == 0) {
+            return 0;
+        }
+
+        int i = 0;
+        while (true) {
+            i = (b + a) >>> 1;
+            int result = compare(name, array[i].name);
+            if (result == 1) {
+                a = i;
+            } else if (result == 0) {
+                return i;
+            } else {
+                b = i;
+            }
+            if ((b - a) == 1) {
+                int result2 = compare(name, array[b].name);
+                if (result2 < 0) {
+                    return a;
+                } else {
+                    return b;
+                }
+            }
+        }
+
+    }
+
+
+    /**
+     * Compare given char chunk with char array.
+     * Return -1, 0 or +1 if inferior, equal, or superior to the String.
+     */
+    protected static final int compare(CharChunk name, char[] compareTo) {
+        int result = 0;
+
+        char[] c = name.getBuffer();
+        int start = name.getStart();
+        int end = name.getEnd();
+        int len = compareTo.length;
+
+        if ((end - start) < len) {
+            len = end - start;
+        }
+        for (int i = 0; (i < len) && (result == 0); i++) {
+            if (c[i + start] > compareTo[i]) {
+                result = 1;
+            } else if (c[i + start] < compareTo[i]) {
+                result = -1;
+            }
+        }
+        if (result == 0) {
+            if (compareTo.length > (end - start)) {
+                result = -1;
+            } else if (compareTo.length < (end - start)) {
+                result = 1;
+            }
+        }
+        return result;
+    }
+
+
+    /**
+     * Find an entry given its name in the cache and return the associated
+     * String.
+     */
+    protected static final String find(CharChunk name) {
+        int pos = findClosest(name, ccCache, ccCache.length);
+        if ((pos < 0) || (compare(name, ccCache[pos].name) != 0)) {
+            return null;
+        } else {
+            return ccCache[pos].value;
+        }
+    }
+
+
+    /**
+     * Find an entry given its name in a sorted array of map elements.
+     * This will return the index for the closest inferior or equal item in the
+     * given array.
+     */
+    protected static final int findClosest(CharChunk name, CharEntry[] array,
+            int len) {
+
+        int a = 0;
+        int b = len - 1;
+
+        // Special cases: -1 and 0
+        if (b == -1) {
+            return -1;
+        }
+
+        if (compare(name, array[0].name) < 0 ) {
+            return -1;
+        }
+        if (b == 0) {
+            return 0;
+        }
+
+        int i = 0;
+        while (true) {
+            i = (b + a) >>> 1;
+            int result = compare(name, array[i].name);
+            if (result == 1) {
+                a = i;
+            } else if (result == 0) {
+                return i;
+            } else {
+                b = i;
+            }
+            if ((b - a) == 1) {
+                int result2 = compare(name, array[b].name);
+                if (result2 < 0) {
+                    return a;
+                } else {
+                    return b;
+                }
+            }
+        }
+
+    }
+
+
+    // -------------------------------------------------- ByteEntry Inner Class
+
+
+    private static class ByteEntry {
+
+        private byte[] name = null;
+        private Charset charset = null;
+        private String value = null;
+
+        @Override
+        public String toString() {
+            return value;
+        }
+        @Override
+        public int hashCode() {
+            return value.hashCode();
+        }
+        @Override
+        public boolean equals(Object obj) {
+            if (obj instanceof ByteEntry) {
+                return value.equals(((ByteEntry) obj).value);
+            }
+            return false;
+        }
+
+    }
+
+
+    // -------------------------------------------------- CharEntry Inner Class
+
+
+    private static class CharEntry {
+
+        private char[] name = null;
+        private String value = null;
+
+        @Override
+        public String toString() {
+            return value;
+        }
+        @Override
+        public int hashCode() {
+            return value.hashCode();
+        }
+        @Override
+        public boolean equals(Object obj) {
+            if (obj instanceof CharEntry) {
+                return value.equals(((CharEntry) obj).value);
+            }
+            return false;
+        }
+
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
new file mode 100644
index 0000000..b52cda7
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/UDecoder.java
@@ -0,0 +1,421 @@
+/*
+ *  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.util.tomcat.buf;
+
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+
+import com.opensymphony.xwork2.util.logging.Logger;
+import java.io.CharConversionException;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+/**
+ *  All URL decoding happens here. This way we can reuse, review, optimize
+ *  without adding complexity to the buffers.
+ *
+ *  The conversion will modify the original buffer.
+ *
+ *  @author Costin Manolache
+ */
+public final class UDecoder {
+
+    private static final Logger log = LoggerFactory.getLogger(UDecoder.class);
+
+    public static final boolean ALLOW_ENCODED_SLASH =
+        Boolean.parseBoolean(System.getProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "false"));
+
+    private static class DecodeException extends CharConversionException {
+        private static final long serialVersionUID = 1L;
+        public DecodeException(String s) {
+            super(s);
+        }
+
+        @Override
+        public synchronized Throwable fillInStackTrace() {
+            // This class does not provide a stack trace
+            return this;
+        }
+    }
+
+    /** Unexpected end of data. */
+    private static final IOException EXCEPTION_EOF = new DecodeException("EOF");
+
+    /** %xx with not-hex digit */
+    private static final IOException EXCEPTION_NOT_HEX_DIGIT = new DecodeException(
+            "isHexDigit");
+
+    /** %-encoded slash is forbidden in resource path */
+    private static final IOException EXCEPTION_SLASH = new DecodeException(
+            "noSlash");
+
+    public UDecoder()
+    {
+    }
+
+    /** URLDecode, will modify the source.
+     */
+    public void convert( ByteChunk mb, boolean query )
+        throws IOException
+    {
+        int start=mb.getOffset();
+        byte buff[]=mb.getBytes();
+        int end=mb.getEnd();
+
+        int idx= ByteChunk.findByte( buff, start, end, (byte) '%' );
+        int idx2=-1;
+        if( query ) {
+            idx2= ByteChunk.findByte( buff, start, (idx >= 0 ? idx : end), (byte) '+' );
+        }
+        if( idx<0 && idx2<0 ) {
+            return;
+        }
+
+        // idx will be the smallest positive index ( first % or + )
+        if( (idx2 >= 0 && idx2 < idx) || idx < 0 ) {
+            idx=idx2;
+        }
+
+        final boolean noSlash = !(ALLOW_ENCODED_SLASH || query);
+
+        for( int j=idx; j<end; j++, idx++ ) {
+            if( buff[ j ] == '+' && query) {
+                buff[idx]= (byte)' ' ;
+            } else if( buff[ j ] != '%' ) {
+                buff[idx]= buff[j];
+            } else {
+                // read next 2 digits
+                if( j+2 >= end ) {
+                    throw EXCEPTION_EOF;
+                }
+                byte b1= buff[j+1];
+                byte b2=buff[j+2];
+                if( !isHexDigit( b1 ) || ! isHexDigit(b2 )) {
+                    throw EXCEPTION_NOT_HEX_DIGIT;
+                }
+
+                j+=2;
+                int res=x2c( b1, b2 );
+                if (noSlash && (res == '/')) {
+                    throw EXCEPTION_SLASH;
+                }
+                buff[idx]=(byte)res;
+            }
+        }
+
+        mb.setEnd( idx );
+
+        return;
+    }
+
+    // -------------------- Additional methods --------------------
+    // XXX What do we do about charset ????
+
+    /** In-buffer processing - the buffer will be modified
+     */
+    public void convert( CharChunk mb, boolean query )
+        throws IOException
+    {
+        //        log( "Converting a char chunk ");
+        int start=mb.getOffset();
+        char buff[]=mb.getBuffer();
+        int cend=mb.getEnd();
+
+        int idx= CharChunk.indexOf( buff, start, cend, '%' );
+        int idx2=-1;
+        if( query ) {
+            idx2= CharChunk.indexOf( buff, start, (idx >= 0 ? idx : cend), '+' );
+        }
+        if( idx<0 && idx2<0 ) {
+            return;
+        }
+
+        // idx will be the smallest positive index ( first % or + )
+        if( (idx2 >= 0 && idx2 < idx) || idx < 0 ) {
+            idx=idx2;
+        }
+
+        final boolean noSlash = !(ALLOW_ENCODED_SLASH || query);
+
+        for( int j=idx; j<cend; j++, idx++ ) {
+            if( buff[ j ] == '+' && query ) {
+                buff[idx]=( ' ' );
+            } else if( buff[ j ] != '%' ) {
+                buff[idx]=buff[j];
+            } else {
+                // read next 2 digits
+                if( j+2 >= cend ) {
+                    // invalid
+                    throw EXCEPTION_EOF;
+                }
+                char b1= buff[j+1];
+                char b2=buff[j+2];
+                if( !isHexDigit( b1 ) || ! isHexDigit(b2 )) {
+                    throw EXCEPTION_NOT_HEX_DIGIT;
+                }
+
+                j+=2;
+                int res=x2c( b1, b2 );
+                if (noSlash && (res == '/')) {
+                    throw EXCEPTION_SLASH;
+                }
+                buff[idx]=(char)res;
+            }
+        }
+        mb.setEnd( idx );
+    }
+
+    /** URLDecode, will modify the source
+     */
+    public void convert(MessageBytes mb, boolean query)
+        throws IOException
+    {
+
+        switch (mb.getType()) {
+        case MessageBytes.T_STR:
+            String strValue=mb.toString();
+            if( strValue==null ) {
+                return;
+            }
+            try {
+                mb.setString( convert( strValue, query ));
+            } catch (RuntimeException ex) {
+                throw new DecodeException(ex.getMessage());
+            }
+            break;
+        case MessageBytes.T_CHARS:
+            CharChunk charC=mb.getCharChunk();
+            convert( charC, query );
+            break;
+        case MessageBytes.T_BYTES:
+            ByteChunk bytesC=mb.getByteChunk();
+            convert( bytesC, query );
+            break;
+        }
+    }
+
+    // XXX Old code, needs to be replaced !!!!
+    //
+    public final String convert(String str, boolean query)
+    {
+        if (str == null) {
+            return  null;
+        }
+
+        if( (!query || str.indexOf( '+' ) < 0) && str.indexOf( '%' ) < 0 ) {
+            return str;
+        }
+
+        final boolean noSlash = !(ALLOW_ENCODED_SLASH || query);
+
+        StringBuilder dec = new StringBuilder();    // decoded string output
+        int strPos = 0;
+        int strLen = str.length();
+
+        dec.ensureCapacity(str.length());
+        while (strPos < strLen) {
+            int laPos;        // lookahead position
+
+            // look ahead to next URLencoded metacharacter, if any
+            for (laPos = strPos; laPos < strLen; laPos++) {
+                char laChar = str.charAt(laPos);
+                if ((laChar == '+' && query) || (laChar == '%')) {
+                    break;
+                }
+            }
+
+            // if there were non-metacharacters, copy them all as a block
+            if (laPos > strPos) {
+                dec.append(str.substring(strPos,laPos));
+                strPos = laPos;
+            }
+
+            // shortcut out of here if we're at the end of the string
+            if (strPos >= strLen) {
+                break;
+            }
+
+            // process next metacharacter
+            char metaChar = str.charAt(strPos);
+            if (metaChar == '+') {
+                dec.append(' ');
+                strPos++;
+                continue;
+            } else if (metaChar == '%') {
+                // We throw the original exception - the super will deal with
+                // it
+                //                try {
+                char res = (char) Integer.parseInt(
+                        str.substring(strPos + 1, strPos + 3), 16);
+                if (noSlash && (res == '/')) {
+                    throw new IllegalArgumentException("noSlash");
+                }
+                dec.append(res);
+                strPos += 3;
+            }
+        }
+
+        return dec.toString();
+    }
+
+
+    /**
+     * Decode and return the specified URL-encoded String.
+     * When the byte array is converted to a string, the system default
+     * character encoding is used...  This may be different than some other
+     * servers. It is assumed the string is not a query string.
+     *
+     * @param str The url-encoded string
+     *
+     * @exception IllegalArgumentException if a '%' character is not followed
+     * by a valid 2-digit hexadecimal number
+     */
+    public static String URLDecode(String str) {
+        return URLDecode(str, null);
+    }
+
+
+    /**
+     * Decode and return the specified URL-encoded String. It is assumed the
+     * string is not a query string.
+     *
+     * @param str The url-encoded string
+     * @param enc The encoding to use; if null, the default encoding is used. If
+     * an unsupported encoding is specified null will be returned
+     * @exception IllegalArgumentException if a '%' character is not followed
+     * by a valid 2-digit hexadecimal number
+     */
+    public static String URLDecode(String str, String enc) {
+        return URLDecode(str, enc, false);
+    }
+
+
+    /**
+     * Decode and return the specified URL-encoded String.
+     *
+     * @param str The url-encoded string
+     * @param enc The encoding to use; if null, the default encoding is used. If
+     * an unsupported encoding is specified null will be returned
+     * @param isQuery Is this a query string being processed
+     * @exception IllegalArgumentException if a '%' character is not followed
+     * by a valid 2-digit hexadecimal number
+     */
+    public static String URLDecode(String str, String enc, boolean isQuery) {
+        if (str == null)
+            return (null);
+
+        // use the specified encoding to extract bytes out of the
+        // given string so that the encoding is not lost. If an
+        // encoding is not specified, use ISO-8859-1
+        byte[] bytes = null;
+        try {
+            if (enc == null) {
+                bytes = str.getBytes("ISO-8859-1");
+            } else {
+                bytes = str.getBytes(B2CConverter.getCharset(enc));
+            }
+        } catch (UnsupportedEncodingException uee) {
+            if (log.isDebugEnabled()) {
+                log.debug("Unable to URL decode the specified input since the encoding "+ enc + " is not supported.", uee);
+            }
+        }
+
+        return URLDecode(bytes, enc, isQuery);
+
+    }
+
+
+    /**
+     * Decode and return the specified URL-encoded byte array.
+     *
+     * @param bytes The url-encoded byte array
+     * @param enc The encoding to use; if null, the default encoding is used. If
+     * an unsupported encoding is specified null will be returned
+     * @param isQuery Is this a query string being processed
+     * @exception IllegalArgumentException if a '%' character is not followed
+     * by a valid 2-digit hexadecimal number
+     */
+    public static String URLDecode(byte[] bytes, String enc, boolean isQuery) {
+
+        if (bytes == null)
+            return null;
+
+        int len = bytes.length;
+        int ix = 0;
+        int ox = 0;
+        while (ix < len) {
+            byte b = bytes[ix++];     // Get byte to test
+            if (b == '+' && isQuery) {
+                b = (byte)' ';
+            } else if (b == '%') {
+                if (ix + 2 > len) {
+                    throw new IllegalArgumentException(
+                            "The % character must be followed by two hexademical digits");
+                }
+                b = (byte) ((convertHexDigit(bytes[ix++]) << 4)
+                            + convertHexDigit(bytes[ix++]));
+            }
+            bytes[ox++] = b;
+        }
+        if (enc != null) {
+            try {
+                return new String(bytes, 0, ox, B2CConverter.getCharset(enc));
+            } catch (UnsupportedEncodingException uee) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Unable to URL decode the specified input since the encoding " + enc + " is not supported.", uee);
+                }
+                return null;
+            }
+        }
+        return new String(bytes, 0, ox);
+
+    }
+
+
+    private static byte convertHexDigit( byte b ) {
+        if ((b >= '0') && (b <= '9')) return (byte)(b - '0');
+        if ((b >= 'a') && (b <= 'f')) return (byte)(b - 'a' + 10);
+        if ((b >= 'A') && (b <= 'F')) return (byte)(b - 'A' + 10);
+        throw new IllegalArgumentException(((char) b) + " is not a hexadecimal digit");
+    }
+
+
+    private static boolean isHexDigit( int c ) {
+        return ( ( c>='0' && c<='9' ) ||
+                 ( c>='a' && c<='f' ) ||
+                 ( c>='A' && c<='F' ));
+    }
+
+
+    private static int x2c( byte b1, byte b2 ) {
+        int digit= (b1>='A') ? ( (b1 & 0xDF)-'A') + 10 :
+            (b1 -'0');
+        digit*=16;
+        digit +=(b2>='A') ? ( (b2 & 0xDF)-'A') + 10 :
+            (b2 -'0');
+        return digit;
+    }
+
+
+    private static int x2c( char b1, char b2 ) {
+        int digit= (b1>='A') ? ( (b1 & 0xDF)-'A') + 10 :
+            (b1 -'0');
+        digit*=16;
+        digit +=(b2>='A') ? ( (b2 & 0xDF)-'A') + 10 :
+            (b2 -'0');
+        return digit;
+    }
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/util/tomcat/buf/Utf8Decoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/util/tomcat/buf/Utf8Decoder.java b/core/src/main/java/org/apache/struts2/util/tomcat/buf/Utf8Decoder.java
new file mode 100644
index 0000000..b08b236
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/tomcat/buf/Utf8Decoder.java
@@ -0,0 +1,293 @@
+/*
+ * 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.util.tomcat.buf;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CoderResult;
+
+/**
+ * Decodes bytes to UTF-8. Extracted from Apache Harmony and modified to reject
+ * code points from U+D800 to U+DFFF as per RFC3629. The standard Java decoder
+ * does not reject these. It has also been modified to reject code points
+ * greater than U+10FFFF which the standard Java decoder rejects but the harmony
+ * one does not.
+ */
+public class Utf8Decoder extends CharsetDecoder {
+
+    // The next table contains information about UTF-8 charset and
+    // correspondence of 1st byte to the length of sequence
+    // For information please visit http://www.ietf.org/rfc/rfc3629.txt
+    //
+    // Please note, o means 0, actually.
+    // -------------------------------------------------------------------
+    // 0 1 2 3 Value
+    // -------------------------------------------------------------------
+    // oxxxxxxx                            00000000 00000000 0xxxxxxx
+    // 11oyyyyy 1oxxxxxx                   00000000 00000yyy yyxxxxxx
+    // 111ozzzz 1oyyyyyy 1oxxxxxx          00000000 zzzzyyyy yyxxxxxx
+    // 1111ouuu 1ouuzzzz 1oyyyyyy 1oxxxxxx 000uuuuu zzzzyyyy yyxxxxxx
+    private static final int remainingBytes[] = {
+            // 1owwwwww
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+            // 11oyyyyy
+            -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+            // 111ozzzz
+            2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+            // 1111ouuu
+            3, 3, 3, 3, 3, -1, -1, -1,
+            // > 11110111
+            -1, -1, -1, -1, -1, -1, -1, -1};
+    private static final int remainingNumbers[] = {0, // 0 1 2 3
+            4224, // (01o00000b << 6)+(1o000000b)
+            401536, // (011o0000b << 12)+(1o000000b << 6)+(1o000000b)
+            29892736 // (0111o000b << 18)+(1o000000b << 12)+(1o000000b <<
+            // 6)+(1o000000b)
+    };
+    private static final int lowerEncodingLimit[] = {-1, 0x80, 0x800, 0x10000};
+
+
+    public Utf8Decoder() {
+        super(B2CConverter.UTF_8, 1.0f, 1.0f);
+    }
+
+
+    @Override
+    protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) {
+        if (in.hasArray() && out.hasArray()) {
+            return decodeHasArray(in, out);
+        }
+        return decodeNotHasArray(in, out);
+    }
+
+
+    private CoderResult decodeNotHasArray(ByteBuffer in, CharBuffer out) {
+        int outRemaining = out.remaining();
+        int pos = in.position();
+        int limit = in.limit();
+        try {
+            while (pos < limit) {
+                if (outRemaining == 0) {
+                    return CoderResult.OVERFLOW;
+                }
+                int jchar = in.get();
+                if (jchar < 0) {
+                    jchar = jchar & 0x7F;
+                    int tail = remainingBytes[jchar];
+                    if (tail == -1) {
+                        return CoderResult.malformedForLength(1);
+                    }
+                    if (limit - pos < 1 + tail) {
+                        // No early test for invalid sequences here as peeking
+                        // at the next byte is harder
+                        return CoderResult.UNDERFLOW;
+                    }
+                    int nextByte;
+                    for (int i = 0; i < tail; i++) {
+                        nextByte = in.get() & 0xFF;
+                        if ((nextByte & 0xC0) != 0x80) {
+                            return CoderResult.malformedForLength(1 + i);
+                        }
+                        jchar = (jchar << 6) + nextByte;
+                    }
+                    jchar -= remainingNumbers[tail];
+                    if (jchar < lowerEncodingLimit[tail]) {
+                        // Should have been encoded in a fewer octets
+                        return CoderResult.malformedForLength(1);
+                    }
+                    pos += tail;
+                }
+                // Apache Tomcat added test
+                if (jchar >= 0xD800 && jchar <= 0xDFFF) {
+                    return CoderResult.unmappableForLength(3);
+                }
+                // Apache Tomcat added test
+                if (jchar > 0x10FFFF) {
+                    return CoderResult.unmappableForLength(4);
+                }
+                if (jchar <= 0xffff) {
+                    out.put((char) jchar);
+                    outRemaining--;
+                } else {
+                    if (outRemaining < 2) {
+                        return CoderResult.OVERFLOW;
+                    }
+                    out.put((char) ((jchar >> 0xA) + 0xD7C0));
+                    out.put((char) ((jchar & 0x3FF) + 0xDC00));
+                    outRemaining -= 2;
+                }
+                pos++;
+            }
+            return CoderResult.UNDERFLOW;
+        } finally {
+            in.position(pos);
+        }
+    }
+
+
+    private CoderResult decodeHasArray(ByteBuffer in, CharBuffer out) {
+        int outRemaining = out.remaining();
+        int pos = in.position();
+        int limit = in.limit();
+        final byte[] bArr = in.array();
+        final char[] cArr = out.array();
+        final int inIndexLimit = limit + in.arrayOffset();
+        int inIndex = pos + in.arrayOffset();
+        int outIndex = out.position() + out.arrayOffset();
+        // if someone would change the limit in process,
+        // he would face consequences
+        for (; inIndex < inIndexLimit && outRemaining > 0; inIndex++) {
+            int jchar = bArr[inIndex];
+            if (jchar < 0) {
+                jchar = jchar & 0x7F;
+                // If first byte is invalid, tail will be set to -1
+                int tail = remainingBytes[jchar];
+                if (tail == -1) {
+                    in.position(inIndex - in.arrayOffset());
+                    out.position(outIndex - out.arrayOffset());
+                    return CoderResult.malformedForLength(1);
+                }
+                // Additional checks to detect invalid sequences ASAP
+                // Checks derived from Unicode 6.2, Chapter 3, Table 3-7
+                // Check 2nd byte
+                int tailAvailable = inIndexLimit - inIndex - 1;
+                if (tailAvailable > 0) {
+                    // First byte C2..DF, second byte 80..BF
+                    if (jchar > 0x41 && jchar < 0x60 &&
+                            (bArr[inIndex + 1] & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte E0, second byte A0..BF
+                    if (jchar == 0x60 && (bArr[inIndex + 1] & 0xE0) != 0xA0) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte E1..EC, second byte 80..BF
+                    if (jchar > 0x60 && jchar < 0x6D &&
+                            (bArr[inIndex + 1] & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte ED, second byte 80..9F
+                    if (jchar == 0x6D && (bArr[inIndex + 1] & 0xE0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte EE..EF, second byte 80..BF
+                    if (jchar > 0x6D && jchar < 0x70 &&
+                            (bArr[inIndex + 1] & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte F0, second byte 90..BF
+                    if (jchar == 0x70 &&
+                            ((bArr[inIndex + 1] & 0xFF) < 0x90 ||
+                                    (bArr[inIndex + 1] & 0xFF) > 0xBF)) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte F1..F3, second byte 80..BF
+                    if (jchar > 0x70 && jchar < 0x74 &&
+                            (bArr[inIndex + 1] & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                    // First byte F4, second byte 80..8F
+                    if (jchar == 0x74 &&
+                            (bArr[inIndex + 1] & 0xF0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1);
+                    }
+                }
+                // Check third byte if present and expected
+                if (tailAvailable > 1 && tail > 1) {
+                    if ((bArr[inIndex + 2] & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(2);
+                    }
+                }
+                // Check fourth byte if present and expected
+                if (tailAvailable > 2 && tail > 2) {
+                    if ((bArr[inIndex + 3] & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(3);
+                    }
+                }
+                if (tailAvailable < tail) {
+                    break;
+                }
+                for (int i = 0; i < tail; i++) {
+                    int nextByte = bArr[inIndex + i + 1] & 0xFF;
+                    if ((nextByte & 0xC0) != 0x80) {
+                        in.position(inIndex - in.arrayOffset());
+                        out.position(outIndex - out.arrayOffset());
+                        return CoderResult.malformedForLength(1 + i);
+                    }
+                    jchar = (jchar << 6) + nextByte;
+                }
+                jchar -= remainingNumbers[tail];
+                if (jchar < lowerEncodingLimit[tail]) {
+                    // Should have been encoded in fewer octets
+                    in.position(inIndex - in.arrayOffset());
+                    out.position(outIndex - out.arrayOffset());
+                    return CoderResult.malformedForLength(1);
+                }
+                inIndex += tail;
+            }
+            // Apache Tomcat added test
+            if (jchar >= 0xD800 && jchar <= 0xDFFF) {
+                return CoderResult.unmappableForLength(3);
+            }
+            // Apache Tomcat added test
+            if (jchar > 0x10FFFF) {
+                return CoderResult.unmappableForLength(4);
+            }
+            if (jchar <= 0xffff) {
+                cArr[outIndex++] = (char) jchar;
+                outRemaining--;
+            } else {
+                if (outRemaining < 2) {
+                    return CoderResult.OVERFLOW;
+                }
+                cArr[outIndex++] = (char) ((jchar >> 0xA) + 0xD7C0);
+                cArr[outIndex++] = (char) ((jchar & 0x3FF) + 0xDC00);
+                outRemaining -= 2;
+            }
+        }
+        in.position(inIndex - in.arrayOffset());
+        out.position(outIndex - out.arrayOffset());
+        return (outRemaining == 0 && inIndex < inIndexLimit) ?
+                CoderResult.OVERFLOW :
+                CoderResult.UNDERFLOW;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java b/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
index 4e62c21..9e8418b 100644
--- a/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
+++ b/core/src/main/java/org/apache/struts2/views/util/DefaultUrlHelper.java
@@ -27,6 +27,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.util.URLDecoderUtil;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -267,15 +268,15 @@ public class DefaultUrlHelper implements UrlHelper {
 	}
 
 	/**
-	 * Decodes the URL using {@link java.net.URLDecoder#decode(String, String)} with the encoding specified in the configuration.
+	 * Decodes the URL using {@link URLDecoderUtil#decode(String, String)} with the encoding specified in the configuration.
 	 *
 	 * @param input the input to decode
 	 * @return the encoded string
 	 */
 	public String decode( String input ) {
 		try {
-			return URLDecoder.decode(input, encoding);
-		} catch (UnsupportedEncodingException e) {
+            return URLDecoderUtil.decode(input, encoding);
+		} catch (Exception e) {
     		LOG.warn("Could not decode URL parameter '{}', returning value un-decoded", input);
 			return input;
 		}

http://git-wip-us.apache.org/repos/asf/struts/blob/76f18840/core/src/test/java/org/apache/struts2/util/URLDecoderUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/util/URLDecoderUtilTest.java b/core/src/test/java/org/apache/struts2/util/URLDecoderUtilTest.java
new file mode 100644
index 0000000..f21c08f
--- /dev/null
+++ b/core/src/test/java/org/apache/struts2/util/URLDecoderUtilTest.java
@@ -0,0 +1,71 @@
+package org.apache.struts2.util;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class URLDecoderUtilTest {
+
+    @Test
+    public void testURLDecodeStringInvalid() {
+        // %n rather than %nn should throw an IAE according to the Javadoc
+        Exception exception = null;
+        try {
+            URLDecoderUtil.decode("%5xxxxx", "ISO-8859-1");
+        } catch (Exception e) {
+            exception = e;
+        }
+        assertTrue(exception instanceof IllegalArgumentException);
+
+        // Edge case trying to trigger ArrayIndexOutOfBoundsException
+        exception = null;
+        try {
+            URLDecoderUtil.decode("%5", "ISO-8859-1");
+        } catch (Exception e) {
+            exception = e;
+        }
+        assertTrue(exception instanceof IllegalArgumentException);
+    }
+
+    @Test
+    public void testURLDecodeStringValidIso88591Start() {
+
+        String result = URLDecoderUtil.decode("%41xxxx", "ISO-8859-1");
+        assertEquals("Axxxx", result);
+    }
+
+    @Test
+    public void testURLDecodeStringValidIso88591Middle() {
+
+        String result = URLDecoderUtil.decode("xx%41xx", "ISO-8859-1");
+        assertEquals("xxAxx", result);
+    }
+
+    @Test
+    public void testURLDecodeStringValidIso88591End() {
+
+        String result = URLDecoderUtil.decode("xxxx%41", "ISO-8859-1");
+        assertEquals("xxxxA", result);
+    }
+
+    @Test
+    public void testURLDecodeStringValidUtf8Start() {
+        String result = URLDecoderUtil.decode("%c3%aaxxxx", "UTF-8");
+        assertEquals("\u00eaxxxx", result);
+    }
+
+    @Test
+    public void testURLDecodeStringValidUtf8Middle() {
+
+        String result = URLDecoderUtil.decode("xx%c3%aaxx", "UTF-8");
+        assertEquals("xx\u00eaxx", result);
+    }
+
+    @Test
+    public void testURLDecodeStringValidUtf8End() {
+
+        String result = URLDecoderUtil.decode("xxxx%c3%aa", "UTF-8");
+        assertEquals("xxxx\u00ea", result);
+    }
+
+}
\ No newline at end of file


[42/50] [abbrv] struts git commit: Extracts constants representing expression languages

Posted by lu...@apache.org.
Extracts constants representing expression languages


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

Branch: refs/heads/master
Commit: 4771dfa63da7c4c1329319201050f4abc1aa0df2
Parents: 6274820
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Fri Jan 15 08:45:54 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:20 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/tiles/StrutsTilesContainerFactory.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/4771dfa6/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 57594af..8403610 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
@@ -97,6 +97,12 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
      */
     public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
 
+    /**
+     * Supported expression languages
+     */
+    public static final String OGNL = "OGNL";
+    public static final String EL = "EL";
+
     @Override
     public TilesContainer createDecoratedContainer(TilesContainer originalContainer, ApplicationContext applicationContext) {
         return new CachingTilesContainer(originalContainer);
@@ -137,8 +143,8 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
             LocaleResolver resolver) {
 
         BasicAttributeEvaluatorFactory attributeEvaluatorFactory = new BasicAttributeEvaluatorFactory(new DirectAttributeEvaluator());
-        attributeEvaluatorFactory.registerAttributeEvaluator("OGNL", createOGNLEvaluator());
-        attributeEvaluatorFactory.registerAttributeEvaluator("EL", createELEvaluator(applicationContext));
+        attributeEvaluatorFactory.registerAttributeEvaluator(OGNL, createOGNLEvaluator());
+        attributeEvaluatorFactory.registerAttributeEvaluator(EL, createELEvaluator(applicationContext));
 
         return attributeEvaluatorFactory;
     }


[11/50] [abbrv] struts git commit: Fix for WW-4312

Posted by lu...@apache.org.
Fix for WW-4312

A problem on Iterator tag


and  WW-3010 s:iterator fails to iterate over collections containing
null 


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

Branch: refs/heads/master
Commit: fd33dc84a674edbeecfc5638995da9a13816dafc
Parents: e9bd945
Author: Victor Sosa <vi...@gmail.com>
Authored: Mon Jan 4 18:03:47 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/struts2/components/IteratorComponent.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/fd33dc84/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/components/IteratorComponent.java b/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
index b62424f..1474fe9 100644
--- a/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
+++ b/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
@@ -304,7 +304,7 @@ public class IteratorComponent extends ContextBean {
 
             String var = getVar();
 
-            if ((var != null) && (currentValue != null)) {
+            if ((var != null)) {
                 putInContext(currentValue);
             }
 


[04/50] [abbrv] struts git commit: make test passed for people not using GMT.

Posted by lu...@apache.org.
make test passed for people not using GMT.


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

Branch: refs/heads/master
Commit: 49a7fe14d57c5dd607dee9d99d94a796f0b37c11
Parents: cee303a
Author: donghui <hu...@hpe.com>
Authored: Mon Jan 4 11:23:51 2016 +0800
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:17:09 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/rest/DefaultHttpHeadersTest.java | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/49a7fe14/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java b/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
index 57e9d67..d800536 100644
--- a/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
+++ b/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
@@ -27,6 +27,8 @@ import org.springframework.mock.web.MockHttpServletResponse;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Locale;
+import java.util.TimeZone;
 
 import static javax.servlet.http.HttpServletResponse.*;
 
@@ -130,7 +132,7 @@ public class DefaultHttpHeadersTest extends TestCase {
         Date now = new Date();
         DefaultHttpHeaders headers = new DefaultHttpHeaders()
                 .lastModified(now);
-        mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz").format(now));
+        mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(now));
         headers.apply(mockRequest, mockResponse, new Object());
 
         assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus());
@@ -149,7 +151,7 @@ public class DefaultHttpHeadersTest extends TestCase {
     public void testLastModifiedSince() {
         Date now = new Date();
         DefaultHttpHeaders headers = new DefaultHttpHeaders().lastModified(now);
-        mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz").format(now));
+        mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(now));
         headers.apply(mockRequest, mockResponse, new Object());
 
         assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus());
@@ -158,7 +160,7 @@ public class DefaultHttpHeadersTest extends TestCase {
     public void testLastModifiedSinceIsOlder() {
         Date now = new Date();
         DefaultHttpHeaders headers = new DefaultHttpHeaders().lastModified(now);
-        mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz").format(new Date(now.getTime() - 1000 * 60 * 60)));
+        mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(new Date(now.getTime() - 1000 * 60 * 60)));
         headers.apply(mockRequest, mockResponse, new Object());
 
         assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus());
@@ -170,7 +172,7 @@ public class DefaultHttpHeadersTest extends TestCase {
                 .lastModified(now)
                 .withETag("asdf");
         mockRequest.addHeader("If-None-Match", "asdf");
-        mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz").format(now));
+        mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(now));
         headers.apply(mockRequest, mockResponse, new Object());
 
         assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus());
@@ -216,4 +218,10 @@ public class DefaultHttpHeadersTest extends TestCase {
         assertEquals(SC_OK, mockResponse.getStatus());
 
     }
+    
+    private SimpleDateFormat getGMTDateFormat() {
+        SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
+        format.setTimeZone(TimeZone.getTimeZone("GMT"));
+        return format;
+    }
 }


[49/50] [abbrv] struts git commit: Merge branch 'master' into http-parameters

Posted by lu...@apache.org.
Merge branch 'master' into http-parameters


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

Branch: refs/heads/master
Commit: 9ad0dfba1d74f494e33b1ba5fab1ce8c7d3f6412
Parents: b48082a 104bd92
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Wed May 18 14:57:38 2016 +0200
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Wed May 18 14:57:38 2016 +0200

----------------------------------------------------------------------
 .travis.yml                                     |    9 +
 README.md                                       |    5 +
 apps/pom.xml                                    |    2 +-
 apps/portlet/pom.xml                            |    2 +-
 .../src/main/webapp/WEB-INF/view/index.jsp      |    4 +-
 .../struts2/portlet/test/BasePortletTest.java   |   20 +-
 apps/rest-showcase/pom.xml                      |    4 +-
 apps/showcase/pom.xml                           |    2 +-
 archetypes/pom.xml                              |    2 +-
 archetypes/struts2-archetype-angularjs/pom.xml  |    2 +-
 .../webapp/js/lib/angular/angular-animate.js    |  915 ++--
 .../js/lib/angular/angular-animate.min.js       |  104 +-
 .../js/lib/angular/angular-animate.min.js.map   |    4 +-
 .../main/webapp/js/lib/angular/angular-aria.js  |  171 +-
 .../webapp/js/lib/angular/angular-aria.min.js   |   19 +-
 .../js/lib/angular/angular-aria.min.js.map      |    6 +-
 .../webapp/js/lib/angular/angular-cookies.js    |   19 +-
 .../js/lib/angular/angular-cookies.min.js       |   10 +-
 .../js/lib/angular/angular-cookies.min.js.map   |    4 +-
 .../webapp/js/lib/angular/angular-loader.js     |   51 +-
 .../webapp/js/lib/angular/angular-loader.min.js |   10 +-
 .../js/lib/angular/angular-loader.min.js.map    |    4 +-
 .../js/lib/angular/angular-message-format.js    |    4 +-
 .../lib/angular/angular-message-format.min.js   |    4 +-
 .../webapp/js/lib/angular/angular-messages.js   |   21 +-
 .../js/lib/angular/angular-messages.min.js      |   15 +-
 .../js/lib/angular/angular-messages.min.js.map  |    6 +-
 .../main/webapp/js/lib/angular/angular-mocks.js |  478 +-
 .../webapp/js/lib/angular/angular-resource.js   |  167 +-
 .../js/lib/angular/angular-resource.min.js      |   20 +-
 .../js/lib/angular/angular-resource.min.js.map  |    6 +-
 .../main/webapp/js/lib/angular/angular-route.js |   47 +-
 .../webapp/js/lib/angular/angular-route.min.js  |   22 +-
 .../js/lib/angular/angular-route.min.js.map     |    4 +-
 .../webapp/js/lib/angular/angular-sanitize.js   |  526 ++-
 .../js/lib/angular/angular-sanitize.min.js      |   23 +-
 .../js/lib/angular/angular-sanitize.min.js.map  |    6 +-
 .../webapp/js/lib/angular/angular-scenario.js   | 4387 +++++++++++------
 .../main/webapp/js/lib/angular/angular-touch.js |  129 +-
 .../webapp/js/lib/angular/angular-touch.min.js  |   19 +-
 .../js/lib/angular/angular-touch.min.js.map     |    6 +-
 .../src/main/webapp/js/lib/angular/angular.js   | 4400 ++++++++++++------
 .../main/webapp/js/lib/angular/angular.min.js   |  592 +--
 .../webapp/js/lib/angular/angular.min.js.map    |    6 +-
 .../src/main/webapp/js/lib/angular/errors.json  |    2 +-
 .../js/lib/angular/i18n/angular-locale_af-na.js |   15 +
 .../js/lib/angular/i18n/angular-locale_af-za.js |   15 +
 .../js/lib/angular/i18n/angular-locale_af.js    |   15 +
 .../lib/angular/i18n/angular-locale_agq-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_agq.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ak-gh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ak.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_am-et.js |   15 +
 .../js/lib/angular/i18n/angular-locale_am.js    |   15 +
 .../lib/angular/i18n/angular-locale_ar-001.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-ae.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-bh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-dj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-dz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-eg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-eh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-er.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-il.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-iq.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-jo.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-km.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-kw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-lb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-ly.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-ma.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-mr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-om.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-ps.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-qa.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-sa.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-sd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-so.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-ss.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-sy.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-td.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-tn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar-ye.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ar.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_as-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_as.js    |   15 +
 .../lib/angular/i18n/angular-locale_asa-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_asa.js   |   15 +
 .../lib/angular/i18n/angular-locale_ast-es.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ast.js   |   15 +
 .../angular/i18n/angular-locale_az-cyrl-az.js   |   15 +
 .../lib/angular/i18n/angular-locale_az-cyrl.js  |   15 +
 .../angular/i18n/angular-locale_az-latn-az.js   |   15 +
 .../lib/angular/i18n/angular-locale_az-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_az.js    |   15 +
 .../lib/angular/i18n/angular-locale_bas-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_bas.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_be-by.js |   15 +
 .../js/lib/angular/i18n/angular-locale_be.js    |   15 +
 .../lib/angular/i18n/angular-locale_bem-zm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_bem.js   |   15 +
 .../lib/angular/i18n/angular-locale_bez-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_bez.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_bg-bg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_bg.js    |   15 +
 .../angular/i18n/angular-locale_bm-latn-ml.js   |   15 +
 .../lib/angular/i18n/angular-locale_bm-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_bm.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_bn-bd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_bn-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_bn.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_bo-cn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_bo-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_bo.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_br-fr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_br.js    |   15 +
 .../lib/angular/i18n/angular-locale_brx-in.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_brx.js   |   15 +
 .../angular/i18n/angular-locale_bs-cyrl-ba.js   |   15 +
 .../lib/angular/i18n/angular-locale_bs-cyrl.js  |   15 +
 .../angular/i18n/angular-locale_bs-latn-ba.js   |   15 +
 .../lib/angular/i18n/angular-locale_bs-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_bs.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ca-ad.js |   15 +
 .../i18n/angular-locale_ca-es-valencia.js       |   15 +
 .../js/lib/angular/i18n/angular-locale_ca-es.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ca-fr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ca-it.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ca.js    |   15 +
 .../lib/angular/i18n/angular-locale_cgg-ug.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_cgg.js   |   15 +
 .../lib/angular/i18n/angular-locale_chr-us.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_chr.js   |   15 +
 .../angular/i18n/angular-locale_ckb-arab-iq.js  |   15 +
 .../angular/i18n/angular-locale_ckb-arab-ir.js  |   15 +
 .../lib/angular/i18n/angular-locale_ckb-arab.js |   15 +
 .../lib/angular/i18n/angular-locale_ckb-iq.js   |   15 +
 .../lib/angular/i18n/angular-locale_ckb-ir.js   |   15 +
 .../angular/i18n/angular-locale_ckb-latn-iq.js  |   15 +
 .../lib/angular/i18n/angular-locale_ckb-latn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ckb.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_cs-cz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_cs.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_cy-gb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_cy.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_da-dk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_da-gl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_da.js    |   15 +
 .../lib/angular/i18n/angular-locale_dav-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_dav.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_de-at.js |   15 +
 .../js/lib/angular/i18n/angular-locale_de-be.js |   15 +
 .../js/lib/angular/i18n/angular-locale_de-ch.js |   15 +
 .../js/lib/angular/i18n/angular-locale_de-de.js |   15 +
 .../js/lib/angular/i18n/angular-locale_de-li.js |   15 +
 .../js/lib/angular/i18n/angular-locale_de-lu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_de.js    |   15 +
 .../lib/angular/i18n/angular-locale_dje-ne.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_dje.js   |   15 +
 .../lib/angular/i18n/angular-locale_dsb-de.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_dsb.js   |   15 +
 .../lib/angular/i18n/angular-locale_dua-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_dua.js   |   15 +
 .../lib/angular/i18n/angular-locale_dyo-sn.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_dyo.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_dz-bt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_dz.js    |   15 +
 .../lib/angular/i18n/angular-locale_ebu-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ebu.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ee-gh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ee-tg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ee.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_el-cy.js |   15 +
 .../js/lib/angular/i18n/angular-locale_el-gr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_el.js    |   15 +
 .../lib/angular/i18n/angular-locale_en-001.js   |   15 +
 .../lib/angular/i18n/angular-locale_en-150.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ag.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ai.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-as.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-au.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-bb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-be.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-bm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-bs.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-bw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-bz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ca.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-cc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ck.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-cm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-cx.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-dg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-dm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-er.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-fj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-fk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-fm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-gy.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-hk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ie.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-im.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-io.js |   15 +
 .../lib/angular/i18n/angular-locale_en-iso.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_en-je.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-jm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ke.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ki.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-kn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ky.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-lc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-lr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ls.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mo.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mp.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ms.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-mw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-my.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-na.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-nf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ng.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-nr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-nu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-nz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-pg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ph.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-pk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-pn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-pr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-pw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-rw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ss.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sx.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-sz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-tc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-tk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-to.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-tt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-tv.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-tz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ug.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-um.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-us.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-vc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-vg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-vi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-vu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-ws.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-za.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-zm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en-zw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_en.js    |   15 +
 .../lib/angular/i18n/angular-locale_eo-001.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_eo.js    |   15 +
 .../lib/angular/i18n/angular-locale_es-419.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ar.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-bo.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-cl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-co.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-cr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-cu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-do.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ea.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ec.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-es.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-gq.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-gt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-hn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ic.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-mx.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ni.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-pa.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-pe.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ph.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-pr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-py.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-sv.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-us.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-uy.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es-ve.js |   15 +
 .../js/lib/angular/i18n/angular-locale_es.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_et-ee.js |   15 +
 .../js/lib/angular/i18n/angular-locale_et.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_eu-es.js |   15 +
 .../js/lib/angular/i18n/angular-locale_eu.js    |   15 +
 .../lib/angular/i18n/angular-locale_ewo-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ewo.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_fa-af.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fa-ir.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fa.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ff-cm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ff-gn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ff-mr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ff-sn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ff.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_fi-fi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fi.js    |   15 +
 .../lib/angular/i18n/angular-locale_fil-ph.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_fil.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_fo-fo.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fo.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-be.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-bf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-bi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-bj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-bl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ca.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-cd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-cf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-cg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ch.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ci.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-cm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-dj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-dz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-fr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ga.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-gf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-gn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-gp.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-gq.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ht.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-km.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-lu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ma.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-mc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-mf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-mg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ml.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-mq.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-mr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-mu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-nc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-ne.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-pf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-pm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-re.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-rw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-sc.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-sn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-sy.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-td.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-tg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-tn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-vu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-wf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr-yt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fr.js    |   15 +
 .../lib/angular/i18n/angular-locale_fur-it.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_fur.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_fy-nl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_fy.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ga-ie.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ga.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_gd-gb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_gd.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_gl-es.js |   15 +
 .../js/lib/angular/i18n/angular-locale_gl.js    |   15 +
 .../lib/angular/i18n/angular-locale_gsw-ch.js   |   15 +
 .../lib/angular/i18n/angular-locale_gsw-fr.js   |   15 +
 .../lib/angular/i18n/angular-locale_gsw-li.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_gsw.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_gu-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_gu.js    |   15 +
 .../lib/angular/i18n/angular-locale_guz-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_guz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_gv-im.js |   15 +
 .../js/lib/angular/i18n/angular-locale_gv.js    |   15 +
 .../angular/i18n/angular-locale_ha-latn-gh.js   |   15 +
 .../angular/i18n/angular-locale_ha-latn-ne.js   |   15 +
 .../angular/i18n/angular-locale_ha-latn-ng.js   |   15 +
 .../lib/angular/i18n/angular-locale_ha-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_ha.js    |   15 +
 .../lib/angular/i18n/angular-locale_haw-us.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_haw.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_he-il.js |   15 +
 .../js/lib/angular/i18n/angular-locale_he.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_hi-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_hi.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_hr-ba.js |   15 +
 .../js/lib/angular/i18n/angular-locale_hr-hr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_hr.js    |   15 +
 .../lib/angular/i18n/angular-locale_hsb-de.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_hsb.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_hu-hu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_hu.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_hy-am.js |   15 +
 .../js/lib/angular/i18n/angular-locale_hy.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_id-id.js |   15 +
 .../js/lib/angular/i18n/angular-locale_id.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ig-ng.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ig.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ii-cn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ii.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_in.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_is-is.js |   15 +
 .../js/lib/angular/i18n/angular-locale_is.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_it-ch.js |   15 +
 .../js/lib/angular/i18n/angular-locale_it-it.js |   15 +
 .../js/lib/angular/i18n/angular-locale_it-sm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_it.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_iw.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ja-jp.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ja.js    |   15 +
 .../lib/angular/i18n/angular-locale_jgo-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_jgo.js   |   15 +
 .../lib/angular/i18n/angular-locale_jmc-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_jmc.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ka-ge.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ka.js    |   15 +
 .../lib/angular/i18n/angular-locale_kab-dz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kab.js   |   15 +
 .../lib/angular/i18n/angular-locale_kam-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kam.js   |   15 +
 .../lib/angular/i18n/angular-locale_kde-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kde.js   |   15 +
 .../lib/angular/i18n/angular-locale_kea-cv.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kea.js   |   15 +
 .../lib/angular/i18n/angular-locale_khq-ml.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_khq.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ki-ke.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ki.js    |   15 +
 .../angular/i18n/angular-locale_kk-cyrl-kz.js   |   15 +
 .../lib/angular/i18n/angular-locale_kk-cyrl.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_kk.js    |   15 +
 .../lib/angular/i18n/angular-locale_kkj-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kkj.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kl-gl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_kl.js    |   15 +
 .../lib/angular/i18n/angular-locale_kln-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kln.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_km-kh.js |   15 +
 .../js/lib/angular/i18n/angular-locale_km.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_kn-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_kn.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ko-kp.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ko-kr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ko.js    |   15 +
 .../lib/angular/i18n/angular-locale_kok-in.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kok.js   |   15 +
 .../angular/i18n/angular-locale_ks-arab-in.js   |   15 +
 .../lib/angular/i18n/angular-locale_ks-arab.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_ks.js    |   15 +
 .../lib/angular/i18n/angular-locale_ksb-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ksb.js   |   15 +
 .../lib/angular/i18n/angular-locale_ksf-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ksf.js   |   15 +
 .../lib/angular/i18n/angular-locale_ksh-de.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ksh.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_kw-gb.js |   15 +
 .../js/lib/angular/i18n/angular-locale_kw.js    |   15 +
 .../angular/i18n/angular-locale_ky-cyrl-kg.js   |   15 +
 .../lib/angular/i18n/angular-locale_ky-cyrl.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_ky.js    |   15 +
 .../lib/angular/i18n/angular-locale_lag-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_lag.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_lb-lu.js |   15 +
 .../js/lib/angular/i18n/angular-locale_lb.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_lg-ug.js |   15 +
 .../js/lib/angular/i18n/angular-locale_lg.js    |   15 +
 .../lib/angular/i18n/angular-locale_lkt-us.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_lkt.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ln-ao.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ln-cd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ln-cf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ln-cg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ln.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_lo-la.js |   15 +
 .../js/lib/angular/i18n/angular-locale_lo.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_lt-lt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_lt.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_lu-cd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_lu.js    |   15 +
 .../lib/angular/i18n/angular-locale_luo-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_luo.js   |   15 +
 .../lib/angular/i18n/angular-locale_luy-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_luy.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_lv-lv.js |   15 +
 .../js/lib/angular/i18n/angular-locale_lv.js    |   15 +
 .../lib/angular/i18n/angular-locale_mas-ke.js   |   15 +
 .../lib/angular/i18n/angular-locale_mas-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mas.js   |   15 +
 .../lib/angular/i18n/angular-locale_mer-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mer.js   |   15 +
 .../lib/angular/i18n/angular-locale_mfe-mu.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mfe.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mg-mg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_mg.js    |   15 +
 .../lib/angular/i18n/angular-locale_mgh-mz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mgh.js   |   15 +
 .../lib/angular/i18n/angular-locale_mgo-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mgo.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mk-mk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_mk.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ml-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ml.js    |   15 +
 .../angular/i18n/angular-locale_mn-cyrl-mn.js   |   15 +
 .../lib/angular/i18n/angular-locale_mn-cyrl.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_mn.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_mr-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_mr.js    |   15 +
 .../angular/i18n/angular-locale_ms-latn-bn.js   |   15 +
 .../angular/i18n/angular-locale_ms-latn-my.js   |   15 +
 .../angular/i18n/angular-locale_ms-latn-sg.js   |   15 +
 .../lib/angular/i18n/angular-locale_ms-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_ms.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_mt-mt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_mt.js    |   15 +
 .../lib/angular/i18n/angular-locale_mua-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_mua.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_my-mm.js |   15 +
 .../js/lib/angular/i18n/angular-locale_my.js    |   15 +
 .../lib/angular/i18n/angular-locale_naq-na.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_naq.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_nb-no.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nb-sj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nb.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_nd-zw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nd.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ne-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ne-np.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ne.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-aw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-be.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-bq.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-cw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-nl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-sr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl-sx.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nl.js    |   15 +
 .../lib/angular/i18n/angular-locale_nmg-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_nmg.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_nn-no.js |   15 +
 .../js/lib/angular/i18n/angular-locale_nn.js    |   15 +
 .../lib/angular/i18n/angular-locale_nnh-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_nnh.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_no-no.js |   15 +
 .../js/lib/angular/i18n/angular-locale_no.js    |   15 +
 .../lib/angular/i18n/angular-locale_nus-sd.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_nus.js   |   15 +
 .../lib/angular/i18n/angular-locale_nyn-ug.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_nyn.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_om-et.js |   15 +
 .../js/lib/angular/i18n/angular-locale_om-ke.js |   15 +
 .../js/lib/angular/i18n/angular-locale_om.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_or-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_or.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_os-ge.js |   15 +
 .../js/lib/angular/i18n/angular-locale_os-ru.js |   15 +
 .../js/lib/angular/i18n/angular-locale_os.js    |   15 +
 .../angular/i18n/angular-locale_pa-arab-pk.js   |   15 +
 .../lib/angular/i18n/angular-locale_pa-arab.js  |   15 +
 .../angular/i18n/angular-locale_pa-guru-in.js   |   15 +
 .../lib/angular/i18n/angular-locale_pa-guru.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_pa.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_pl-pl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pl.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ps-af.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ps.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-ao.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-br.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-cv.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-gw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-mo.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-mz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-pt.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-st.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt-tl.js |   15 +
 .../js/lib/angular/i18n/angular-locale_pt.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_qu-bo.js |   15 +
 .../js/lib/angular/i18n/angular-locale_qu-ec.js |   15 +
 .../js/lib/angular/i18n/angular-locale_qu-pe.js |   15 +
 .../js/lib/angular/i18n/angular-locale_qu.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_rm-ch.js |   15 +
 .../js/lib/angular/i18n/angular-locale_rm.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_rn-bi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_rn.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ro-md.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ro-ro.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ro.js    |   15 +
 .../lib/angular/i18n/angular-locale_rof-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_rof.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ru-by.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ru-kg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ru-kz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ru-md.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ru-ru.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ru-ua.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ru.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_rw-rw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_rw.js    |   15 +
 .../lib/angular/i18n/angular-locale_rwk-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_rwk.js   |   15 +
 .../lib/angular/i18n/angular-locale_sah-ru.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_sah.js   |   15 +
 .../lib/angular/i18n/angular-locale_saq-ke.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_saq.js   |   15 +
 .../lib/angular/i18n/angular-locale_sbp-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_sbp.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_se-fi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_se-no.js |   15 +
 .../js/lib/angular/i18n/angular-locale_se-se.js |   15 +
 .../js/lib/angular/i18n/angular-locale_se.js    |   15 +
 .../lib/angular/i18n/angular-locale_seh-mz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_seh.js   |   15 +
 .../lib/angular/i18n/angular-locale_ses-ml.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_ses.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_sg-cf.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sg.js    |   15 +
 .../angular/i18n/angular-locale_shi-latn-ma.js  |   15 +
 .../lib/angular/i18n/angular-locale_shi-latn.js |   15 +
 .../angular/i18n/angular-locale_shi-tfng-ma.js  |   15 +
 .../lib/angular/i18n/angular-locale_shi-tfng.js |   15 +
 .../js/lib/angular/i18n/angular-locale_shi.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_si-lk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_si.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_sk-sk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sk.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_sl-si.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sl.js    |   15 +
 .../lib/angular/i18n/angular-locale_smn-fi.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_smn.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_sn-zw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sn.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_so-dj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_so-et.js |   15 +
 .../js/lib/angular/i18n/angular-locale_so-ke.js |   15 +
 .../js/lib/angular/i18n/angular-locale_so-so.js |   15 +
 .../js/lib/angular/i18n/angular-locale_so.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_sq-al.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sq-mk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sq-xk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sq.js    |   15 +
 .../angular/i18n/angular-locale_sr-cyrl-ba.js   |   15 +
 .../angular/i18n/angular-locale_sr-cyrl-me.js   |   15 +
 .../angular/i18n/angular-locale_sr-cyrl-rs.js   |   15 +
 .../angular/i18n/angular-locale_sr-cyrl-xk.js   |   15 +
 .../lib/angular/i18n/angular-locale_sr-cyrl.js  |   15 +
 .../angular/i18n/angular-locale_sr-latn-ba.js   |   15 +
 .../angular/i18n/angular-locale_sr-latn-me.js   |   15 +
 .../angular/i18n/angular-locale_sr-latn-rs.js   |   15 +
 .../angular/i18n/angular-locale_sr-latn-xk.js   |   15 +
 .../lib/angular/i18n/angular-locale_sr-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_sr.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_sv-ax.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sv-fi.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sv-se.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sv.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_sw-cd.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sw-ke.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sw-tz.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sw-ug.js |   15 +
 .../js/lib/angular/i18n/angular-locale_sw.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ta-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ta-lk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ta-my.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ta-sg.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ta.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_te-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_te.js    |   15 +
 .../lib/angular/i18n/angular-locale_teo-ke.js   |   15 +
 .../lib/angular/i18n/angular-locale_teo-ug.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_teo.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_th-th.js |   15 +
 .../js/lib/angular/i18n/angular-locale_th.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ti-er.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ti-et.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ti.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_tl.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_to-to.js |   15 +
 .../js/lib/angular/i18n/angular-locale_to.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_tr-cy.js |   15 +
 .../js/lib/angular/i18n/angular-locale_tr-tr.js |   15 +
 .../js/lib/angular/i18n/angular-locale_tr.js    |   15 +
 .../lib/angular/i18n/angular-locale_twq-ne.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_twq.js   |   15 +
 .../angular/i18n/angular-locale_tzm-latn-ma.js  |   15 +
 .../lib/angular/i18n/angular-locale_tzm-latn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_tzm.js   |   15 +
 .../angular/i18n/angular-locale_ug-arab-cn.js   |   15 +
 .../lib/angular/i18n/angular-locale_ug-arab.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_ug.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_uk-ua.js |   15 +
 .../js/lib/angular/i18n/angular-locale_uk.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_ur-in.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ur-pk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_ur.js    |   15 +
 .../angular/i18n/angular-locale_uz-arab-af.js   |   15 +
 .../lib/angular/i18n/angular-locale_uz-arab.js  |   15 +
 .../angular/i18n/angular-locale_uz-cyrl-uz.js   |   15 +
 .../lib/angular/i18n/angular-locale_uz-cyrl.js  |   15 +
 .../angular/i18n/angular-locale_uz-latn-uz.js   |   15 +
 .../lib/angular/i18n/angular-locale_uz-latn.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_uz.js    |   15 +
 .../angular/i18n/angular-locale_vai-latn-lr.js  |   15 +
 .../lib/angular/i18n/angular-locale_vai-latn.js |   15 +
 .../angular/i18n/angular-locale_vai-vaii-lr.js  |   15 +
 .../lib/angular/i18n/angular-locale_vai-vaii.js |   15 +
 .../js/lib/angular/i18n/angular-locale_vai.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_vi-vn.js |   15 +
 .../js/lib/angular/i18n/angular-locale_vi.js    |   15 +
 .../lib/angular/i18n/angular-locale_vun-tz.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_vun.js   |   15 +
 .../lib/angular/i18n/angular-locale_wae-ch.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_wae.js   |   15 +
 .../lib/angular/i18n/angular-locale_xog-ug.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_xog.js   |   15 +
 .../lib/angular/i18n/angular-locale_yav-cm.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_yav.js   |   15 +
 .../lib/angular/i18n/angular-locale_yi-001.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_yi.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_yo-bj.js |   15 +
 .../js/lib/angular/i18n/angular-locale_yo-ng.js |   15 +
 .../js/lib/angular/i18n/angular-locale_yo.js    |   15 +
 .../lib/angular/i18n/angular-locale_zgh-ma.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_zgh.js   |   15 +
 .../js/lib/angular/i18n/angular-locale_zh-cn.js |   15 +
 .../angular/i18n/angular-locale_zh-hans-cn.js   |   15 +
 .../angular/i18n/angular-locale_zh-hans-hk.js   |   15 +
 .../angular/i18n/angular-locale_zh-hans-mo.js   |   15 +
 .../angular/i18n/angular-locale_zh-hans-sg.js   |   15 +
 .../lib/angular/i18n/angular-locale_zh-hans.js  |   15 +
 .../angular/i18n/angular-locale_zh-hant-hk.js   |   15 +
 .../angular/i18n/angular-locale_zh-hant-mo.js   |   15 +
 .../angular/i18n/angular-locale_zh-hant-tw.js   |   15 +
 .../lib/angular/i18n/angular-locale_zh-hant.js  |   15 +
 .../js/lib/angular/i18n/angular-locale_zh-hk.js |   15 +
 .../js/lib/angular/i18n/angular-locale_zh-tw.js |   15 +
 .../js/lib/angular/i18n/angular-locale_zh.js    |   15 +
 .../js/lib/angular/i18n/angular-locale_zu-za.js |   15 +
 .../js/lib/angular/i18n/angular-locale_zu.js    |   15 +
 .../src/main/webapp/js/lib/angular/version.json |    2 +-
 .../src/main/webapp/js/lib/angular/version.txt  |    2 +-
 archetypes/struts2-archetype-blank/pom.xml      |    2 +-
 archetypes/struts2-archetype-convention/pom.xml |    2 +-
 archetypes/struts2-archetype-dbportlet/pom.xml  |    2 +-
 archetypes/struts2-archetype-plugin/pom.xml     |    2 +-
 archetypes/struts2-archetype-portlet/pom.xml    |    2 +-
 archetypes/struts2-archetype-starter/pom.xml    |    2 +-
 assembly/pom.xml                                |    2 +-
 bom/pom.xml                                     |    4 +-
 bundles/admin/pom.xml                           |    2 +-
 bundles/demo/pom.xml                            |    2 +-
 bundles/pom.xml                                 |    2 +-
 core/pom.xml                                    |    2 +-
 .../xwork2/DefaultActionInvocation.java         |    4 +-
 .../xwork2/config/entities/ActionConfig.java    |   23 +-
 .../xwork2/config/entities/AllowedMethods.java  |   41 +-
 .../xwork2/config/impl/ActionConfigMatcher.java |    1 +
 .../config/impl/DefaultConfiguration.java       |   10 +
 .../providers/XmlConfigurationProvider.java     |   11 +-
 .../com/opensymphony/xwork2/ognl/OgnlUtil.java  |    6 +-
 .../validator/validators/EmailValidator.java    |    4 +-
 .../org/apache/struts2/StrutsConstants.java     |    1 +
 .../java/org/apache/struts2/components/Div.java |   59 -
 .../org/apache/struts2/components/UIBean.java   |    2 +-
 .../config/AbstractBeanSelectionProvider.java   |   12 +-
 .../config/DefaultBeanSelectionProvider.java    |    2 +-
 .../filter/StrutsPrepareAndExecuteFilter.java   |   32 +-
 .../dispatcher/mapper/DefaultActionMapper.java  |   14 +-
 .../MessageStorePreResultListener.java          |    7 +-
 .../apache/struts2/views/DefaultTagLibrary.java |    2 -
 .../struts2/views/freemarker/tags/DivModel.java |   43 -
 .../views/freemarker/tags/StrutsModels.java     |    9 -
 .../org/apache/struts2/views/jsp/ui/DivTag.java |   39 -
 .../views/velocity/components/DivDirective.java |   47 -
 .../apache/struts2/views/xslt/XSLTResult.java   |    7 +-
 core/src/main/resources/struts-default.xml      |   18 +-
 .../resources/template/simple/div-close.ftl     |   23 -
 core/src/main/resources/template/simple/div.ftl |   32 -
 .../main/resources/template/simple/submit.ftl   |    6 +-
 .../main/resources/template/simple/table.ftl    |   76 -
 .../template/xhtml/controlheader-core.ftl       |    4 +-
 .../config/entities/AllowedMethodsTest.java     |   46 +-
 .../config/impl/ActionConfigMatcherTest.java    |    3 +
 .../opensymphony/xwork2/ognl/OgnlUtilTest.java  |   15 +
 .../xwork2/ognl/SecurityMemberAccessTest.java   |  118 +
 .../DefaultExcludedPatternsCheckerTest.java     |    1 -
 .../xwork2/validator/EmailValidatorTest.java    |    2 +
 .../struts2/components/UIComponentTest.java     |   23 -
 .../mapper/DefaultActionMapperTest.java         |   30 +-
 .../MessageStorePreResultListenerTest.java      |   23 +-
 .../struts2/views/jsp/AbstractUITagTest.java    |    4 +-
 .../apache/struts2/views/jsp/ActionTagTest.java |    5 +-
 .../apache/struts2/views/jsp/URLTagTest.java    |    3 +-
 .../apache/struts2/views/jsp/ui/DivTest.java    |   56 -
 .../apache/struts2/views/jsp/ui/SubmitTest.java |    2 +-
 .../struts2/views/jsp/ui/TextfieldTest.java     |   56 +
 .../VisitorValidatorTestAction.properties       |    1 +
 .../apache/struts2/views/jsp/ui/Submit-1.txt    |    2 +-
 .../apache/struts2/views/jsp/ui/Submit-2.txt    |    2 +-
 .../apache/struts2/views/jsp/ui/Submit-5.txt    |    2 +-
 .../apache/struts2/views/jsp/ui/Submit-6.txt    |    2 +-
 .../struts2/views/jsp/ui/Textfield-12.txt       |   11 +
 .../struts2/views/jsp/ui/Textfield-13.txt       |   11 +
 .../org/apache/struts2/views/jsp/ui/div-1.txt   |    3 -
 plugins/bean-validation/pom.xml                 |    2 +-
 plugins/cdi/pom.xml                             |    2 +-
 plugins/config-browser/pom.xml                  |    2 +-
 plugins/convention/pom.xml                      |    2 +-
 .../PackageBasedActionConfigBuilder.java        |    2 +-
 plugins/dwr/pom.xml                             |    2 +-
 plugins/embeddedjsp/pom.xml                     |    2 +-
 plugins/gxp/pom.xml                             |    2 +-
 plugins/jasperreports/pom.xml                   |    2 +-
 plugins/java8-support/pom.xml                   |    2 +-
 plugins/javatemplates/pom.xml                   |    2 +-
 .../struts2/views/java/simple/DivHandler.java   |   46 -
 .../struts2/views/java/simple/SimpleTheme.java  |    2 -
 .../struts2/views/java/simple/DivTest.java      |   61 -
 plugins/jfreechart/pom.xml                      |    2 +-
 plugins/json/pom.xml                            |    2 +-
 .../org/apache/struts2/json/JSONWriterTest.java |   37 +
 .../struts2/json/jsonwriter-write-bean-04.txt   |   16 +
 plugins/junit/pom.xml                           |    2 +-
 plugins/osgi/pom.xml                            |    2 +-
 plugins/oval/pom.xml                            |    2 +-
 plugins/pell-multipart/pom.xml                  |    2 +-
 plugins/plexus/pom.xml                          |    2 +-
 plugins/pom.xml                                 |    2 +-
 plugins/portlet-tiles/pom.xml                   |    2 +-
 plugins/portlet/pom.xml                         |    2 +-
 plugins/rest/pom.xml                            |    2 +-
 .../apache/struts2/rest/RestActionMapper.java   |    2 +-
 plugins/sitegraph/pom.xml                       |    2 +-
 plugins/sitemesh/pom.xml                        |    2 +-
 plugins/spring/pom.xml                          |    2 +-
 plugins/testng/pom.xml                          |    2 +-
 plugins/tiles/pom.xml                           |    2 +-
 .../tiles/StrutsApplicationResource.java        |    4 +
 .../tiles/StrutsTilesContainerFactory.java      |   40 +-
 .../struts2/tiles/StrutsTilesInitializer.java   |   13 +-
 .../struts2/tiles/StrutsTilesListener.java      |    2 +-
 ...StrutsWildcardServletApplicationContext.java |   10 +-
 pom.xml                                         |    6 +-
 .../VisitorValidatorTestAction.properties       |    1 -
 853 files changed, 19509 insertions(+), 4575 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/9ad0dfba/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
----------------------------------------------------------------------
diff --cc core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
index 3737c46,cd54da5..482a9b2
--- a/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
+++ b/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
@@@ -4,10 -4,12 +4,13 @@@ import com.opensymphony.xwork2.Action
  import com.opensymphony.xwork2.ActionContext;
  import com.opensymphony.xwork2.ActionInvocation;
  import com.opensymphony.xwork2.ActionSupport;
+ import com.opensymphony.xwork2.config.entities.ActionConfig;
+ import com.opensymphony.xwork2.config.entities.ResultConfig;
+ import com.opensymphony.xwork2.mock.MockActionProxy;
  import org.apache.struts2.ServletActionContext;
  import org.apache.struts2.StrutsInternalTestCase;
 +import org.apache.struts2.dispatcher.HttpParameters;
- import org.apache.struts2.result.ServletActionRedirectResult;
+ import org.apache.struts2.result.ServletRedirectResult;
  import org.easymock.EasyMock;
  
  import javax.servlet.http.HttpServletRequest;

http://git-wip-us.apache.org/repos/asf/struts/blob/9ad0dfba/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/struts/blob/9ad0dfba/core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java
----------------------------------------------------------------------


[17/50] [abbrv] struts git commit: Adds additional pattern to prevent access to getClass method

Posted by lu...@apache.org.
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/46f3cf24
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/46f3cf24
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/46f3cf24

Branch: refs/heads/master
Commit: 46f3cf24c4e87b07988068195cda0f7c4fc450f5
Parents: c067020
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Jan 10 11:46:46 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 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/46f3cf24/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/46f3cf24/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 b025784..cdd8003 100644
--- a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
@@ -84,6 +84,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()");
             }
         };
 
@@ -96,13 +97,15 @@ public class ParametersInterceptorTest extends XWorkTestCase {
         pi.setParameters(action, vs, HttpParameters.create(params).build());
 
         // 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)' with value 'true'", msg3);
         assertNull(action.getName());
     }
 


[38/50] [abbrv] struts git commit: increased visibilty of methods and constants for better extensibility

Posted by lu...@apache.org.
increased visibilty of methods and constants for better extensibility


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

Branch: refs/heads/master
Commit: b0613a60ed48540cfa749c482c902872b03517c5
Parents: 4e36a54
Author: cnenning <cn...@apache.org>
Authored: Thu Jan 14 09:33:50 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../org/apache/struts2/json/JSONActionRedirectResult.java    | 8 ++++----
 .../org/apache/struts2/json/JSONValidationInterceptor.java   | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b0613a60/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
index 40aa092..4b8b948 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
@@ -44,12 +44,12 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult {
      * @return true if a JSON response shall be generated, false if a redirect
      *         shall be sent.
      */
-    private boolean sendJsonInsteadOfRedirect() {
+    protected boolean sendJsonInsteadOfRedirect() {
         HttpServletRequest request = ServletActionContext.getRequest();
         return isJsonEnabled(request) && !isValidateOnly(request);
     }
 
-    private void printJson(HttpServletResponse response, String finalLocation) throws IOException {
+    protected void printJson(HttpServletResponse response, String finalLocation) throws IOException {
         response.setStatus(HttpServletResponse.SC_OK);
         response.setContentType("application/json");
         response.setHeader("Location", finalLocation);
@@ -60,11 +60,11 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult {
         writer.close();
     }
 
-    private boolean isJsonEnabled(HttpServletRequest request) {
+    protected boolean isJsonEnabled(HttpServletRequest request) {
         return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_JSON_PARAM));
     }
 
-    private boolean isValidateOnly(HttpServletRequest request) {
+    protected boolean isValidateOnly(HttpServletRequest request) {
         return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_ONLY_PARAM));
     }
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/b0613a60/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
index 0fc7902..20ffb50 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
@@ -74,11 +74,11 @@ public class JSONValidationInterceptor extends MethodFilterInterceptor {
 
     private static final Logger LOG = LogManager.getLogger(JSONValidationInterceptor.class);
 
-    static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
-    static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
-    private static final String NO_ENCODING_SET_PARAM = "struts.JSONValidation.no.encoding";
+    public static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
+    public static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
+    public static final String NO_ENCODING_SET_PARAM = "struts.JSONValidation.no.encoding";
 
-    private static final String DEFAULT_ENCODING = "UTF-8";
+    public static final String DEFAULT_ENCODING = "UTF-8";
 
     private int validationFailedStatus = -1;
 


[39/50] [abbrv] struts git commit: Simplifies logging

Posted by lu...@apache.org.
Simplifies logging


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

Branch: refs/heads/master
Commit: 8b6078570ebec52bfd23f3667d9736fc30bbc8d3
Parents: 47c6467
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Sun Jan 17 10:25:36 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:20 2016 +0100

----------------------------------------------------------------------
 .../struts2/tiles/StrutsWildcardServletApplicationContext.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/8b607857/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
index 2f67f04..0fa1bc3 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
@@ -24,7 +24,6 @@ import com.opensymphony.xwork2.util.WildcardUtil;
 import com.opensymphony.xwork2.util.finder.ResourceFinder;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.message.MessageFormatMessage;
 import org.apache.tiles.request.ApplicationResource;
 import org.apache.tiles.request.servlet.ServletApplicationContext;
 
@@ -89,7 +88,7 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC
         try {
             resources.addAll(findResources(path));
         } catch (IOException e) {
-            LOG.error(new MessageFormatMessage("Cannot find resources for [{}]", path), e);
+            LOG.error("Cannot find resources for [{}]", path, e);
         }
 
         return resources;
@@ -101,7 +100,7 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC
             try {
                 return new StrutsApplicationResource(URI.create("file://" + localePath).toURL());
             } catch (MalformedURLException e) {
-                LOG.warn(new MessageFormatMessage("Cannot access [{}]", localePath), e);
+                LOG.warn("Cannot access [{}]", localePath, e);
                 return null;
             }
         }


[10/50] [abbrv] struts git commit: WW-3710 Adds test to proof support for wildcards in

Posted by lu...@apache.org.
WW-3710 Adds test to proof support for wildcards in <include/>


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

Branch: refs/heads/master
Commit: dad437bd06a015c673157097d41c7c5f25b7f84f
Parents: fd33dc8
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Jan 5 08:16:26 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../providers/XmlConfigurationProviderTest.java     | 16 ++++++++++++++++
 .../providers/xwork-test-include-wildcard.xml       |  8 ++++++++
 2 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/dad437bd/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderTest.java b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderTest.java
index b161d02..6d324cf 100644
--- a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderTest.java
@@ -31,6 +31,7 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 
 public class XmlConfigurationProviderTest extends ConfigurationTestBase {
@@ -198,4 +199,19 @@ public class XmlConfigurationProviderTest extends ConfigurationTestBase {
         assertTrue(!provider.needsReload());
     }
 
+    public void testIncludeWithWildcard() throws Exception {
+        String configFile = "com/opensymphony/xwork2/config/providers/xwork-test-include-wildcard.xml";
+        buildConfigurationProvider(configFile);
+
+        Set<String> loadedFileNames = configuration.getLoadedFileNames();
+        assertEquals(8, loadedFileNames.size());
+        assertTrue(loadedFileNames.contains("com/opensymphony/xwork2/config/providers/xwork-include-after-package.xml"));
+        assertTrue(loadedFileNames.contains("com/opensymphony/xwork2/config/providers/xwork-include-after-package-2.xml"));
+        assertTrue(loadedFileNames.contains("com/opensymphony/xwork2/config/providers/xwork-include-before-package.xml"));
+        assertTrue(loadedFileNames.contains("com/opensymphony/xwork2/config/providers/xwork-include-before-package-2.xml"));
+        assertTrue(loadedFileNames.contains("com/opensymphony/xwork2/config/providers/xwork-include-parent.xml"));
+        assertTrue(loadedFileNames.contains("com/opensymphony/xwork2/config/providers/xwork-test-include-wildcard.xml"));
+        assertTrue(loadedFileNames.contains("xwork-test-beans.xml"));
+        assertTrue(loadedFileNames.contains("xwork-test-default.xml"));
+    }
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/dad437bd/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-include-wildcard.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-include-wildcard.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-include-wildcard.xml
new file mode 100644
index 0000000..6bf5cc6
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-include-wildcard.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.1//EN"
+    "http://struts.apache.org/dtds/xwork-2.1.dtd"
+    >
+
+<xwork>
+  <include file="com/opensymphony/xwork2/config/providers/xwork-include-*.xml"/>
+</xwork>


[21/50] [abbrv] struts git commit: Adds missing Tiles API dependency

Posted by lu...@apache.org.
Adds missing Tiles API dependency


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

Branch: refs/heads/master
Commit: 0737d7281cffc0b869282a41f921b23189f2425d
Parents: 8d83dc2
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 10:13:38 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:42 2016 +0100

----------------------------------------------------------------------
 plugins/tiles/pom.xml | 4 ++++
 pom.xml               | 5 +++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/0737d728/plugins/tiles/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index be39762..09cd71e 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -36,6 +36,10 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.tiles</groupId>
+            <artifactId>tiles-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tiles</groupId>
             <artifactId>tiles-core</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/struts/blob/0737d728/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4edd1fd..3732ad1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -605,6 +605,11 @@
 
             <dependency>
                 <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-api</artifactId>
+                <version>${tiles.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
                 <artifactId>tiles-core</artifactId>
                 <version>${tiles.version}</version>
             </dependency>


[44/50] [abbrv] struts git commit: Adds support to use Struts' Locale

Posted by lu...@apache.org.
Adds support to use Struts' Locale


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

Branch: refs/heads/master
Commit: 42628da3c34dca808817ec00fd76d89922c6d006
Parents: 4771dfa
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Fri Jan 15 10:12:15 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:20 2016 +0100

----------------------------------------------------------------------
 .../tiles/StrutsTilesContainerFactory.java      |  4 ++
 .../tiles/StrutsTilesLocaleResolver.java        | 54 ++++++++++++++++++++
 2 files changed, 58 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/42628da3/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 8403610..0cb14f3 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
@@ -161,6 +161,10 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
         return resolver;
     }
 
+    protected LocaleResolver createLocaleResolver(ApplicationContext applicationContext) {
+        return new StrutsTilesLocaleResolver();
+    }
+
     @Override
     protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
         Collection<ApplicationResource> resources = applicationContext.getResources(getTilesDefinitionPattern(applicationContext.getInitParams()));

http://git-wip-us.apache.org/repos/asf/struts/blob/42628da3/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
new file mode 100644
index 0000000..2c0ef9d
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
@@ -0,0 +1,54 @@
+/*
+ * 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;
+import com.opensymphony.xwork2.LocaleProvider;
+import com.opensymphony.xwork2.config.ConfigurationException;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.ServletActionContext;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.servlet.ServletUtil;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Locale;
+
+public class StrutsTilesLocaleResolver implements LocaleResolver {
+
+    private static Logger LOG = LogManager.getLogger(StrutsTilesLocaleResolver.class);
+
+    @Override
+    public Locale resolveLocale(Request request) {
+        HttpServletRequest httpRequest = ServletUtil.getServletRequest(request).getRequest();
+        ActionContext ctx = ServletActionContext.getActionContext(httpRequest);
+
+        if (ctx == null) {
+            LOG.error("Cannot obtain HttpServletRequest from [{}]", request.getClass().getName());
+            throw new ConfigurationException("There is no ActionContext for current request!");
+        }
+
+        LocaleProvider provider = ctx.getInstance(LocaleProvider.class);
+
+        return provider.getLocale();
+    }
+
+}


[36/50] [abbrv] struts git commit: Simplifies logic to fetch HttpServletRequest

Posted by lu...@apache.org.
Simplifies logic to fetch HttpServletRequest


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

Branch: refs/heads/master
Commit: 4e36a54549d5d5f42b86315730c2d09312b85ea3
Parents: e53a119
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Thu Jan 14 08:17:50 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../tiles/StrutsFreeMarkerAttributeRenderer.java     | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/4e36a545/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 0b19b1d..5102ead 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
@@ -36,9 +36,8 @@ import org.apache.struts2.views.freemarker.StrutsBeanWrapper;
 import org.apache.tiles.freemarker.template.TilesFMModelRepository;
 import org.apache.tiles.impl.InvalidTemplateException;
 import org.apache.tiles.request.Request;
-import org.apache.tiles.request.jsp.JspRequest;
 import org.apache.tiles.request.render.Renderer;
-import org.apache.tiles.request.servlet.ServletRequest;
+import org.apache.tiles.request.servlet.ServletUtil;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
@@ -81,18 +80,10 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
      * or a ServletRequest (FreeMarker)
      */
     protected ActionContext readActionContext(Request request) {
-        ActionContext ctx = null;
-
         LOG.debug("Obtaining HttpServletRequest based on [{}]", request.getClass().getName());
 
-        if (request instanceof ServletRequest) {
-            HttpServletRequest httpRequest = ((ServletRequest) request).getRequest();
-            ctx = ServletActionContext.getActionContext(httpRequest);
-        }
-        if (request instanceof JspRequest) {
-            HttpServletRequest httpRequest = (HttpServletRequest) ((JspRequest) request).getPageContext().getRequest();
-            ctx = ServletActionContext.getActionContext(httpRequest);
-        }
+        HttpServletRequest httpRequest = ServletUtil.getServletRequest(request).getRequest();
+        ActionContext ctx = ServletActionContext.getActionContext(httpRequest);
 
         if (ctx == null) {
             LOG.error("Cannot obtain HttpServletRequest from [{}]", request.getClass().getName());


[29/50] [abbrv] struts git commit: WW-4403 - add JDK 8 profile, disabling JavaDoc lint checker when building with JDK8 (cherry picked from commit 7c4bb7e)

Posted by lu...@apache.org.
WW-4403 - add JDK 8 profile, disabling JavaDoc lint checker when building with JDK8
(cherry picked from commit 7c4bb7e)


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

Branch: refs/heads/master
Commit: 50c95d43de024e37d66dc9242037a00b2fe78de5
Parents: 4720f46
Author: Rene Gielen <rg...@apache.org>
Authored: Thu Jan 14 17:43:20 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/struts/blob/50c95d43/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5d836d3..08c94b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -149,6 +149,25 @@
             </build>
         </profile>
 -->
+        <profile>
+            <id>jdk8</id>
+            <activation>
+                <jdk>1.8</jdk>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-javadoc-plugin</artifactId>
+                            <configuration>
+                                <additionalparam>-Xdoclint:none</additionalparam>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
     </profiles>
 
     <build>


[25/50] [abbrv] struts git commit: made methods non static and private, javadoc updates

Posted by lu...@apache.org.
made methods non static and private, javadoc updates


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

Branch: refs/heads/master
Commit: 8a2f083d5dc2a20abd267e3c3fa3bd696da804e5
Parents: f6d0e15
Author: cnenning <cn...@apache.org>
Authored: Tue Jan 12 14:14:09 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:18 2016 +0100

----------------------------------------------------------------------
 .../validation/AjaxFormSubmitAction.java        |  2 +-
 .../struts2/json/JSONActionRedirectResult.java  | 23 ++++++++++----------
 2 files changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/8a2f083d/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
index b179370..50ff53f 100644
--- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
@@ -23,7 +23,7 @@ import com.opensymphony.xwork2.validator.annotations.UrlValidator;
  * <ul>
  *   <li>Depends on <code>json-plugin</code>.</li>
  *   <li>Requires <code>jsonValidationInterceptor</code> to be on stack.</li>
- *   <li>Uses a special json redirect result type.</li>
+ *   <li>Uses result type <code>jsonActionRedirect</code>.</li>
  *   <li>Uses http parameters <code>struts.enableJSONValidation=true</code> and <code>struts.validateOnly=false</code>.</li>
  *   <li>Uses a customized theme to make sure html elements required as error containers are always present and easily selectable in JS.</li>
  *   <li>Uses some custom JS code depending on jQuery to issue AJAX request and to render errors in html.</li>

http://git-wip-us.apache.org/repos/asf/struts/blob/8a2f083d/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
index f0f3f39..40aa092 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
@@ -16,13 +16,12 @@ import org.apache.struts2.result.ServletActionRedirectResult;
  * don't pass them to JS handlers. So this result produces a JSON response
  * containing redirect data.
  *
- *<p>
- * To be used along with {@link JSONValidationInterceptor}.
- *</p>
- *<p>
- * Response JSON looks like this:
- * <pre>{"location": "$redirect url$"}</pre>
- *</p>
+ * <p>To be used along with {@link JSONValidationInterceptor}.</p>
+ *
+ * <p>Response JSON looks like this:
+ * 
+ *     <pre>{"location": "$redirect url$"}</pre>
+ * </p>
  *
  */
 public class JSONActionRedirectResult extends ServletActionRedirectResult {
@@ -30,7 +29,7 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult {
     private static final long serialVersionUID = 3107276294073879542L;
 
     @Override
-	protected void sendRedirect(HttpServletResponse response, String finalLocation) throws IOException {
+    protected void sendRedirect(HttpServletResponse response, String finalLocation) throws IOException {
         if (sendJsonInsteadOfRedirect()) {
             printJson(response, finalLocation);
         } else {
@@ -45,12 +44,12 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult {
      * @return true if a JSON response shall be generated, false if a redirect
      *         shall be sent.
      */
-    static boolean sendJsonInsteadOfRedirect() {
+    private boolean sendJsonInsteadOfRedirect() {
         HttpServletRequest request = ServletActionContext.getRequest();
         return isJsonEnabled(request) && !isValidateOnly(request);
     }
 
-    static void printJson(HttpServletResponse response, String finalLocation) throws IOException {
+    private void printJson(HttpServletResponse response, String finalLocation) throws IOException {
         response.setStatus(HttpServletResponse.SC_OK);
         response.setContentType("application/json");
         response.setHeader("Location", finalLocation);
@@ -61,11 +60,11 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult {
         writer.close();
     }
 
-    private static boolean isJsonEnabled(HttpServletRequest request) {
+    private boolean isJsonEnabled(HttpServletRequest request) {
         return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_JSON_PARAM));
     }
 
-    private static boolean isValidateOnly(HttpServletRequest request) {
+    private boolean isValidateOnly(HttpServletRequest request) {
         return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_ONLY_PARAM));
     }
 }


[48/50] [abbrv] struts git commit: Fixes test to use HttpParameters instead of Map

Posted by lu...@apache.org.
Fixes test to use HttpParameters instead of Map


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

Branch: refs/heads/master
Commit: b48082a8115dee04f33c6db29aacee64973424c6
Parents: 31826bc
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Sat Mar 12 16:14:45 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Sat Mar 12 16:14:45 2016 +0100

----------------------------------------------------------------------
 .../interceptor/MessageStorePreResultListenerTest.java      | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b48082a8/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java b/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
index 4e46b3a..3737c46 100644
--- a/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
+++ b/core/src/test/java/org/apache/struts2/interceptor/MessageStorePreResultListenerTest.java
@@ -6,6 +6,7 @@ import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.ActionSupport;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.StrutsInternalTestCase;
+import org.apache.struts2.dispatcher.HttpParameters;
 import org.apache.struts2.result.ServletActionRedirectResult;
 import org.easymock.EasyMock;
 
@@ -96,7 +97,6 @@ public class MessageStorePreResultListenerTest extends StrutsInternalTestCase {
 
         MessageStorePreResultListener listener = new MessageStorePreResultListener(interceptor);
 
-        Map paramMap = new LinkedHashMap();
         Map sessionMap = new LinkedHashMap();
 
         ActionSupport action = new ActionSupport();
@@ -108,7 +108,7 @@ public class MessageStorePreResultListenerTest extends StrutsInternalTestCase {
         action.addFieldError("field2", "some field error 2");
 
         ActionContext actionContext = new ActionContext(new HashMap());
-        actionContext.put(ActionContext.PARAMETERS, paramMap);
+        actionContext.setParameters(HttpParameters.createEmpty().build());
         actionContext.put(ActionContext.SESSION, sessionMap);
 
         HttpSession mockedSession = EasyMock.createControl().createMock(HttpSession.class);
@@ -172,7 +172,6 @@ public class MessageStorePreResultListenerTest extends StrutsInternalTestCase {
 
         MessageStorePreResultListener listener = new MessageStorePreResultListener(interceptor);
 
-        Map paramMap = new LinkedHashMap();
         Map sessionMap = new LinkedHashMap();
 
         ActionSupport action = new ActionSupport();
@@ -184,8 +183,8 @@ public class MessageStorePreResultListenerTest extends StrutsInternalTestCase {
         action.addFieldError("field2", "some field error 2");
 
         ActionContext actionContext = new ActionContext(new HashMap());
-        actionContext.put(ActionContext.PARAMETERS, paramMap);
-        actionContext.put(ActionContext.SESSION, sessionMap);
+        actionContext.setParameters(HttpParameters.createEmpty().build());
+        actionContext.setSession(sessionMap);
 
         HttpSession mockedSession = EasyMock.createControl().createMock(HttpSession.class);
         HttpServletRequest mockedRequest = EasyMock.createControl().createMock(HttpServletRequest.class);


[22/50] [abbrv] struts git commit: Upgrade Tiles dependencies

Posted by lu...@apache.org.
Upgrade Tiles dependencies


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

Branch: refs/heads/master
Commit: 4e3f950b279b6ad9e24cf1b46ec7c0b58a031c80
Parents: bdf4f0b
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 08:51:14 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:42 2016 +0100

----------------------------------------------------------------------
 plugins/tiles/pom.xml | 13 -------------
 pom.xml               | 13 +------------
 2 files changed, 1 insertion(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/4e3f950b/plugins/tiles/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index 45a9b7e..be39762 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -49,14 +49,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.tiles</groupId>
-            <artifactId>tiles-servlet-wildcard</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tiles</groupId>
-            <artifactId>tiles-jsp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tiles</groupId>
             <artifactId>tiles-freemarker</artifactId>
         </dependency>
         <dependency>
@@ -68,11 +60,6 @@
             <artifactId>tiles-el</artifactId>
         </dependency>
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jsp-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.glassfish</groupId>
             <artifactId>javax.el</artifactId>
             <optional>true</optional>

http://git-wip-us.apache.org/repos/asf/struts/blob/4e3f950b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6d59057..4edd1fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@
         <ognl.version>3.1.2</ognl.version>
         <asm.version>3.3</asm.version>
         <asm5.version>5.0.2</asm5.version>
-        <tiles.version>2.2.2</tiles.version>
+        <tiles.version>3.0.5</tiles.version>
         <log4j2.version>2.5</log4j2.version>
 
         <!-- SCM Site Configuration -->
@@ -622,17 +622,6 @@
                 <groupId>org.apache.tiles</groupId>
                 <artifactId>tiles-jsp</artifactId>
                 <version>${tiles.version}</version>
-                <scope>runtime</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.tiles</groupId>
-                <artifactId>tiles-servlet-wildcard</artifactId>
-                <version>${tiles.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.tiles</groupId>
-                <artifactId>tiles-jsp</artifactId>
-                <version>${tiles.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.tiles</groupId>


[37/50] [abbrv] struts git commit: WW-4381 - exclude org.olap4j:olap4j for compile, to fix broken builds behind Maven mirror

Posted by lu...@apache.org.
WW-4381 - exclude org.olap4j:olap4j for compile, to fix broken builds behind Maven mirror


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

Branch: refs/heads/master
Commit: dd849e82f37d938a788554b80393f752aaf0b3bf
Parents: 50c95d4
Author: Rene Gielen <rg...@apache.org>
Authored: Thu Jan 14 18:04:29 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/struts/blob/dd849e82/plugins/jasperreports/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/pom.xml b/plugins/jasperreports/pom.xml
index 612f0bb..f6a8cd6 100644
--- a/plugins/jasperreports/pom.xml
+++ b/plugins/jasperreports/pom.xml
@@ -43,6 +43,13 @@
             <artifactId>jasperreports</artifactId>
             <version>6.0.3</version>
             <scope>provided</scope>
+            <exclusions>
+                <!-- This is currently not found in Maven central, yet not needed at compile time -->
+                <exclusion>
+                    <groupId>org.olap4j</groupId>
+                    <artifactId>olap4j</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
     <properties>


[43/50] [abbrv] struts git commit: Adds support for I18N

Posted by lu...@apache.org.
Adds support for I18N


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

Branch: refs/heads/master
Commit: 47c6467fe024b4164709f840187b89fbcb0a7ac7
Parents: 42628da
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Fri Jan 15 10:12:25 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:20 2016 +0100

----------------------------------------------------------------------
 .../tiles/StrutsApplicationResource.java        | 55 ++++++++++++++++++++
 ...StrutsWildcardServletApplicationContext.java | 15 ++++--
 2 files changed, 67 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/47c6467f/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
new file mode 100644
index 0000000..6884e9a
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
@@ -0,0 +1,55 @@
+/*
+ * 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 org.apache.tiles.request.locale.PostfixedApplicationResource;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+public class StrutsApplicationResource extends PostfixedApplicationResource {
+
+    private final URL url;
+
+    public StrutsApplicationResource(URL url) {
+        super(url.getPath());
+        this.url = url;
+    }
+
+    @Override
+    public InputStream getInputStream() throws IOException {
+        if (new File(url.getPath()).exists()) {
+            return url.openStream();
+        }
+        return null;
+    }
+
+    @Override
+    public long getLastModified() throws IOException {
+        File file = new File(url.getPath());
+        if (file.exists()) {
+            return file.lastModified();
+        }
+        return 0;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/47c6467f/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
index b8f10f9..2f67f04 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
@@ -26,13 +26,13 @@ import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.message.MessageFormatMessage;
 import org.apache.tiles.request.ApplicationResource;
-import org.apache.tiles.request.locale.URLApplicationResource;
 import org.apache.tiles.request.servlet.ServletApplicationContext;
 
 import javax.servlet.ServletContext;
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URL;
 import java.util.Collection;
 import java.util.Enumeration;
@@ -96,7 +96,16 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC
     }
 
     public ApplicationResource getResource(ApplicationResource base, Locale locale) {
-        return base;
+        String localePath = base.getLocalePath(locale);
+        if (new File(localePath).exists()) {
+            try {
+                return new StrutsApplicationResource(URI.create("file://" + localePath).toURL());
+            } catch (MalformedURLException e) {
+                LOG.warn(new MessageFormatMessage("Cannot access [{}]", localePath), e);
+                return null;
+            }
+        }
+        return null;
     }
 
     protected Set<ApplicationResource> findResources(String path) throws IOException {
@@ -110,7 +119,7 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC
         for (String resource : matches.keySet()) {
             if (pattern.matcher(resource).matches()) {
                 URL url = matches.get(resource);
-                resources.add(new URLApplicationResource(url.getPath(), url));
+                resources.add(new StrutsApplicationResource(url));
             }
         }
 


[08/50] [abbrv] struts git commit: Patch WW-4381

Posted by lu...@apache.org.
Patch WW-4381

upgrade to jasperreports 6.0

to 6.0.3


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

Branch: refs/heads/master
Commit: a446cdacc0f6d9168d03d7602a751b48ce066f1a
Parents: bccf099
Author: Victor Sosa <vi...@gmail.com>
Authored: Mon Jan 4 13:50:41 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 plugins/jasperreports/pom.xml                                    | 4 ++--
 .../apache/struts2/views/jasperreports/JasperReportsResult.java  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/a446cdac/plugins/jasperreports/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/pom.xml b/plugins/jasperreports/pom.xml
index fc32d73..612f0bb 100644
--- a/plugins/jasperreports/pom.xml
+++ b/plugins/jasperreports/pom.xml
@@ -39,9 +39,9 @@
             <artifactId>commons-lang3</artifactId>
         </dependency>
         <dependency>
-            <groupId>jasperreports</groupId>
+            <groupId>net.sf.jasperreports</groupId>
             <artifactId>jasperreports</artifactId>
-            <version>3.1.2</version>
+            <version>6.0.3</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/struts/blob/a446cdac/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index e356506..bee69d6 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -311,7 +311,7 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
 
         // Fill the report and produce a print object
         try {
-            JasperReport jasperReport = (JasperReport) JRLoader.loadObject(systemId);
+            JasperReport jasperReport = (JasperReport) JRLoader.loadObject(new File(systemId));
             if (conn == null) {
                 jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, stackDataSource);
             }


[27/50] [abbrv] struts git commit: Renames class to match pattern used in Tiles

Posted by lu...@apache.org.
Renames class to match pattern used in Tiles


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

Branch: refs/heads/master
Commit: 21a1e8b9a5e658944b9abb7de4ac9c58adeff8dc
Parents: 8a2f083
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 22:16:06 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:18 2016 +0100

----------------------------------------------------------------------
 .../struts2/tiles/StrutsTilesInitializer.java   |   2 +-
 ...StrutsWildcardServletApplicationContext.java | 117 +++++++++++++++++++
 ...sWildcardServletTilesApplicationContext.java | 116 ------------------
 3 files changed, 118 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/21a1e8b9/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 37fe1d1..d0f32f0 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
@@ -34,7 +34,7 @@ public class StrutsTilesInitializer extends AbstractTilesInitializer {
     @Override
     protected ApplicationContext createTilesApplicationContext(ApplicationContext preliminaryContext) {
         LOG.debug("Initializing Tiles wildcard support ...");
-        return new StrutsWildcardServletTilesApplicationContext((ServletContext) preliminaryContext.getContext());
+        return new StrutsWildcardServletApplicationContext((ServletContext) preliminaryContext.getContext());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/struts/blob/21a1e8b9/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
new file mode 100644
index 0000000..abd78a2
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
@@ -0,0 +1,117 @@
+/*
+ * 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;
+import com.opensymphony.xwork2.util.WildcardUtil;
+import com.opensymphony.xwork2.util.finder.ResourceFinder;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.message.MessageFormatMessage;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+
+import javax.servlet.ServletContext;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+public class StrutsWildcardServletApplicationContext extends ServletApplicationContext {
+
+    private static final Logger LOG = LogManager.getLogger(StrutsWildcardServletApplicationContext.class);
+
+    private ResourceFinder finder;
+
+    public StrutsWildcardServletApplicationContext(ServletContext context) {
+        super(context);
+
+        Set<URL> 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);
+            }
+        }
+
+        try {
+            Enumeration<URL> 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()]));
+    }
+
+    public Collection<ApplicationResource> getResources(String path) {
+        Set<ApplicationResource> resources = new HashSet<>();
+
+        if (path.startsWith("/")) {
+            LOG.trace("Using ServletContext to load resource {}", path);
+            ApplicationResource resource = getResource(path);
+            if (resource != null) {
+                resources.add(resource);
+            }
+        }
+
+        try {
+            resources.addAll(findResources(path));
+        } catch (IOException e) {
+            LOG.error(new MessageFormatMessage("Cannot find resources for [{}]", path), e);
+        }
+
+        return resources;
+    }
+
+    protected Set<ApplicationResource> findResources(String path) throws IOException {
+        Set<ApplicationResource> resources = new HashSet<>();
+
+        LOG.trace("Using ResourceFinder to find matches for {}", path);
+
+        Pattern pattern = WildcardUtil.compileWildcardPattern(path);
+        Map<String, URL> matches = finder.getResourcesMap("");
+
+        for (String resource : matches.keySet()) {
+            if (pattern.matcher(resource).matches()) {
+                URL url = matches.get(resource);
+                resources.add(new URLApplicationResource(url.getPath(), url));
+            }
+        }
+
+        LOG.trace("Found resources {} for path {}", resources, path);
+        return resources;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/21a1e8b9/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
deleted file mode 100644
index d942e96..0000000
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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;
-import com.opensymphony.xwork2.util.WildcardUtil;
-import com.opensymphony.xwork2.util.finder.ResourceFinder;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.message.MessageFormatMessage;
-import org.apache.tiles.request.ApplicationResource;
-import org.apache.tiles.request.locale.URLApplicationResource;
-import org.apache.tiles.request.servlet.ServletApplicationContext;
-
-import javax.servlet.ServletContext;
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-public class StrutsWildcardServletTilesApplicationContext extends ServletApplicationContext {
-
-    private static final Logger LOG = LogManager.getLogger(StrutsWildcardServletTilesApplicationContext.class);
-
-    private ResourceFinder finder;
-
-    public StrutsWildcardServletTilesApplicationContext(ServletContext context) {
-        super(context);
-
-        Set<URL> 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);
-            }
-        }
-
-        try {
-            Enumeration<URL> 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()]));
-    }
-
-    public Collection<ApplicationResource> getResources(String path) {
-        Set<ApplicationResource> resources = new HashSet<>();
-
-        if (path.startsWith("/")) {
-            LOG.trace("Using ServletContext to load resource {}", path);
-            ApplicationResource resource = getResource(path);
-            if (resource != null) {
-                resources.add(resource);
-            }
-        }
-
-        try {
-            resources.addAll(findResources(path));
-        } catch (IOException e) {
-            LOG.error(new MessageFormatMessage("Cannot find resources for [{}]", path), e);
-        }
-
-        return resources;
-    }
-
-    protected Set<ApplicationResource> findResources(String path) throws IOException {
-        Set<ApplicationResource> resources = new HashSet<>();
-
-        LOG.trace("Using ResourceFinder to find matches for {}", path);
-
-        Pattern pattern = WildcardUtil.compileWildcardPattern(path);
-        Map<String, URL> matches = finder.getResourcesMap("");
-
-        for (String resource : matches.keySet()) {
-            if (pattern.matcher(resource).matches()) {
-                URL url = matches.get(resource);
-                resources.add(new URLApplicationResource("", url));
-            }
-        }
-
-        LOG.trace("Found resources {} for path {}", resources, path);
-        return resources;
-    }
-
-}


[40/50] [abbrv] struts git commit: WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI

Posted by lu...@apache.org.
WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI


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

Branch: refs/heads/master
Commit: 5eaef08e52fbb46e1659b46435172d8e52b8b090
Parents: dd849e8
Author: Aleksandr Mashchenko <am...@apache.org>
Authored: Thu Jan 14 20:01:57 2016 +0200
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:20 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/rest/RestActionMapper.java   | 15 ++++++++--
 .../struts2/rest/RestActionMapperTest.java      | 29 ++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/5eaef08e/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
index 816843a..d25b725 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
@@ -308,9 +308,20 @@ public class RestActionMapper extends DefaultActionMapper {
     private void handleDynamicMethodInvocation(ActionMapping mapping, String name) {
         int exclamation = name.lastIndexOf("!");
         if (exclamation != -1) {
-            mapping.setName(name.substring(0, exclamation));
+            String actionName = name.substring(0, exclamation);
+            String actionMethod = name.substring(exclamation + 1);
+
+            // WW-4585
+            // add any ; appendix to name, it will be handled later in getMapping method
+            int scPos = actionMethod.indexOf(';');
+            if (scPos != -1) {
+                actionName = actionName + actionMethod.substring(scPos);
+                actionMethod = actionMethod.substring(0, scPos);
+            }
+
+            mapping.setName(actionName);
             if (allowDynamicMethodCalls) {
-                mapping.setMethod(name.substring(exclamation + 1));
+                mapping.setMethod(actionMethod);
             } else {
                 mapping.setMethod(null);
             }

http://git-wip-us.apache.org/repos/asf/struts/blob/5eaef08e/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java b/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java
index 8d39cc1..9903265 100644
--- a/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java
+++ b/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java
@@ -179,6 +179,35 @@ public class RestActionMapperTest extends TestCase {
         assertEquals("show", mapping.getMethod());
     }
 
+    public void testGetJsessionIdSemicolonMappingWithMethod() throws Exception {
+        req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g");
+        req.setServletPath("/animals/dog/fido");
+        req.setMethod("GET");
+        
+        ActionMapping mapping = mapper.getMapping(req, configManager);
+
+        assertEquals("/animals", mapping.getNamespace());
+        assertEquals("dog", mapping.getName());
+        assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
+        assertEquals("show", mapping.getMethod());
+    }
+
+    public void testGetJsessionIdSemicolonMappingWithMethodAllowDMI() throws Exception {
+        req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g");
+        req.setServletPath("/animals/dog/fido");
+        req.setMethod("GET");
+        
+        // allow DMI
+        mapper.setAllowDynamicMethodCalls("true");
+        
+        ActionMapping mapping = mapper.getMapping(req, configManager);
+
+        assertEquals("/animals", mapping.getNamespace());
+        assertEquals("dog", mapping.getName());
+        assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
+        assertEquals("update", mapping.getMethod());
+    }
+
     public void testParseNameAndNamespace() {
         tryUri("/foo/23", "", "foo/23");
         tryUri("/foo/", "", "foo/");


[50/50] [abbrv] struts git commit: Merge remote-tracking branch 'upstream/master' into http-parameters

Posted by lu...@apache.org.
Merge remote-tracking branch 'upstream/master' into http-parameters


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

Branch: refs/heads/master
Commit: 70fdc00f664947732840e16f4de06ea0cf10487a
Parents: 9ad0dfb cdbf697
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Fri Jul 15 10:53:50 2016 +0200
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Fri Jul 15 10:53:50 2016 +0200

----------------------------------------------------------------------
 .gitignore                                      |    12 +-
 apps/pom.xml                                    |     3 +-
 apps/portlet/README.txt                         |    22 -
 apps/portlet/pom.xml                            |   218 -
 apps/portlet/src/main/etc/exo/web.xml           |    63 -
 .../main/etc/gridsphere/README-gridsphere.txt   |     2 -
 .../main/etc/gridsphere/gridsphere-portlet.xml  |    24 -
 apps/portlet/src/main/etc/gridsphere/group.xml  |    10 -
 apps/portlet/src/main/etc/gridsphere/layout.xml |    19 -
 .../src/main/etc/gridsphere/struts-portlet      |     0
 apps/portlet/src/main/etc/gridsphere/web.xml    |    63 -
 .../src/main/etc/jbossportal2.0/jboss-app.xml   |     3 -
 .../main/etc/jbossportal2.0/jboss-portlet.xml   |    12 -
 .../src/main/etc/jbossportal2.0/jboss-web.xml   |     3 -
 .../etc/jbossportal2.0/portlet-instances.xml    |    11 -
 .../etc/jbossportal2.0/struts-portlet-pages.xml |    18 -
 .../src/main/etc/jbossportal2.2/jboss-app.xml   |     3 -
 .../main/etc/jbossportal2.2/jboss-portlet.xml   |    12 -
 .../src/main/etc/jbossportal2.2/jboss-web.xml   |     3 -
 .../jbossportal2.2/struts-portlet-object.xml    |    25 -
 .../src/main/etc/jetspeed2/README-jetspeed2.txt |     1 -
 .../src/main/etc/jetspeed2/struts-portlet.psml  |    20 -
 apps/portlet/src/main/etc/liferay3.6.1/web.xml  |    75 -
 .../struts2/portlet/example/ExampleAction.java  |    39 -
 .../struts2/portlet/example/FormExample.java    |    50 -
 .../portlet/example/FormExampleModelDriven.java |    37 -
 .../example/FormExampleWithValidation.java      |    47 -
 .../portlet/example/FormResultAction.java       |    49 -
 .../struts2/portlet/example/FormTestAction.java |    36 -
 .../portlet/example/SavePrefsAction.java        |    62 -
 .../portlet/example/eventing/ProcessAction.java |    61 -
 .../portlet/example/eventing/PublishAction.java |    52 -
 .../example/fileupload/FileUploadAction.java    |    81 -
 .../struts2/portlet/example/model/Name.java     |    18 -
 .../portlet/example/spring/SpringAction.java    |    58 -
 .../portlet/example/spring/ThingManager.java    |    38 -
 apps/portlet/src/main/resources/LICENSE.txt     |   174 -
 apps/portlet/src/main/resources/NOTICE.txt      |     5 -
 apps/portlet/src/main/resources/log4j2.xml      |    15 -
 .../FormExample-formExamplePrg-validation.xml   |    13 -
 ...processTilesFreemarkerExample-validation.xml |    13 -
 ...mple-processValidationExample-validation.xml |    13 -
 .../pluto-portal-driver-services-config.xml     |   155 -
 apps/portlet/src/main/resources/struts-edit.xml |    48 -
 .../src/main/resources/struts-eventing.xml      |    21 -
 apps/portlet/src/main/resources/struts-help.xml |    14 -
 .../portlet/src/main/resources/struts-tiles.xml |    27 -
 apps/portlet/src/main/resources/struts-view.xml |   130 -
 apps/portlet/src/main/resources/struts.xml      |    12 -
 .../template/xhtml/components/checkbox.vm       |    12 -
 .../template/xhtml/components/datefield.vm      |     8 -
 .../template/xhtml/components/mytextfield.vm    |    15 -
 apps/portlet/src/main/resources/validators.xml  |    18 -
 .../src/main/resources/velocity.properties      |     1 -
 .../main/webapp/WEB-INF/applicationContext.xml  |    22 -
 .../main/webapp/WEB-INF/edit/defaultEdit.jsp    |     5 -
 .../main/webapp/WEB-INF/edit/formExample.jsp    |     5 -
 .../webapp/WEB-INF/edit/formExampleInput.jsp    |     8 -
 .../src/main/webapp/WEB-INF/edit/index.jsp      |    11 -
 .../main/webapp/WEB-INF/edit/namespaceTest.jsp  |     4 -
 .../src/main/webapp/WEB-INF/edit/prefsForm.jsp  |     6 -
 .../src/main/webapp/WEB-INF/edit/prefsSaved.jsp |     5 -
 .../src/main/webapp/WEB-INF/edit/test.jsp       |     4 -
 .../src/main/webapp/WEB-INF/eventing/index.jsp  |    11 -
 .../main/webapp/WEB-INF/eventing/process.jsp    |    12 -
 .../main/webapp/WEB-INF/help/defaultHelp.jsp    |     1 -
 .../src/main/webapp/WEB-INF/help/index.jsp      |     1 -
 .../webapp/WEB-INF/jetty-pluto-web-default.xml  |   384 -
 .../portlet/src/main/webapp/WEB-INF/portlet.xml |   214 -
 apps/portlet/src/main/webapp/WEB-INF/readme.txt |    10 -
 apps/portlet/src/main/webapp/WEB-INF/tiles.xml  |    46 -
 .../src/main/webapp/WEB-INF/view/fileUpload.jsp |    13 -
 .../webapp/WEB-INF/view/fileUploadSuccess.jsp   |    14 -
 .../main/webapp/WEB-INF/view/formExample.jsp    |     5 -
 .../webapp/WEB-INF/view/formExampleInput.jsp    |     8 -
 .../view/formExampleInputModelDriven.jsp        |     8 -
 .../webapp/WEB-INF/view/formExampleInputPrg.jsp |     8 -
 .../WEB-INF/view/formExampleInputValidation.jsp |     8 -
 .../formExampleSubmitToSelfWithValidation.jsp   |     6 -
 .../webapp/WEB-INF/view/freeMarkerExample.ftl   |     3 -
 .../WEB-INF/view/freeMarkerExampleInput.ftl     |     5 -
 .../src/main/webapp/WEB-INF/view/helloWorld.vm  |     4 -
 .../src/main/webapp/WEB-INF/view/index.jsp      |    18 -
 .../main/webapp/WEB-INF/view/notImplemented.jsp |     1 -
 .../main/webapp/WEB-INF/view/springExample.jsp  |    16 -
 .../main/webapp/WEB-INF/view/tokenExample.jsp   |     5 -
 .../webapp/WEB-INF/view/tokenExampleInput.jsp   |    20 -
 apps/portlet/src/main/webapp/WEB-INF/web.xml    |    31 -
 apps/portlet/src/main/webapp/styles/styles.css  |     7 -
 apps/portlet/src/main/webapp/tiles/footer.ftl   |     5 -
 apps/portlet/src/main/webapp/tiles/footer.jsp   |     6 -
 .../src/main/webapp/tiles/formExample.jsp       |     5 -
 .../webapp/tiles/formExampleInputValidation.jsp |     8 -
 apps/portlet/src/main/webapp/tiles/header.jsp   |     2 -
 apps/portlet/src/main/webapp/tiles/index.jsp    |    13 -
 apps/portlet/src/main/webapp/tiles/layout.jsp   |    13 -
 .../src/test/java/JettyPlutoLauncher.java       |    19 -
 .../struts2/portlet/test/BasePortletTest.java   |    97 -
 .../portlet/test/Struts2PortletTest.java        |    87 -
 apps/rest-showcase/pom.xml                      |     4 +-
 apps/showcase/pom.xml                           |     2 +-
 .../main/resources/struts-actionchaining.xml    |     4 +-
 .../src/main/resources/struts-conversion.xml    |     4 +-
 .../src/main/resources/struts-filedownload.xml  |     4 +-
 .../src/main/resources/struts-fileupload.xml    |     4 +-
 .../src/main/resources/struts-freemarker.xml    |     4 +-
 .../src/main/resources/struts-hangman.xml       |     4 +-
 .../src/main/resources/struts-interactive.xml   |     4 +-
 .../src/main/resources/struts-model-driven.xml  |     4 +-
 .../src/main/resources/struts-person.xml        |     4 +-
 .../src/main/resources/struts-tags-non-ui.xml   |     4 +-
 .../src/main/resources/struts-tags-ui.xml       |     4 +-
 .../showcase/src/main/resources/struts-tags.xml |     4 +-
 .../src/main/resources/struts-tiles.xml         |     4 +-
 .../src/main/resources/struts-token.xml         |     4 +-
 .../src/main/resources/struts-validation.xml    |     4 +-
 .../showcase/src/main/resources/struts-wait.xml |     4 +-
 .../showcase/src/main/resources/struts-xslt.xml |     4 +-
 apps/showcase/src/main/resources/struts.xml     |     4 +-
 archetypes/pom.xml                              |    63 -
 .../struts2-archetype-angularjs/README.txt      |    61 -
 archetypes/struts2-archetype-angularjs/pom.xml  |    86 -
 .../META-INF/maven/archetype-metadata.xml       |    68 -
 .../main/resources/META-INF/maven/archetype.xml |     7 -
 .../resources/archetype-resources/LICENSE.txt   |   174 -
 .../resources/archetype-resources/NOTICE.txt    |     6 -
 .../main/resources/archetype-resources/pom.xml  |   177 -
 .../src/main/java/actions/Index.java            |    42 -
 .../main/java/actions/data/ProjectsAction.java  |    72 -
 .../main/java/actions/data/package-info.java    |    24 -
 .../src/main/resources/jshint.conf.js           |    13 -
 .../src/main/resources/log4j2.xml               |    16 -
 .../src/main/resources/package.properties       |     1 -
 .../src/main/resources/package_es.properties    |     1 -
 .../src/main/resources/struts.xml               |    16 -
 .../src/main/webapp/WEB-INF/content/index.jsp   |    38 -
 .../src/main/webapp/WEB-INF/web.xml             |    20 -
 .../src/main/webapp/index.jsp                   |     1 -
 .../src/main/webapp/js/app.js                   |    26 -
 .../src/main/webapp/js/config.js                |    40 -
 .../js/controllers/ApacheProjectsController.js  |    40 -
 .../main/webapp/js/controllers/AppController.js |    29 -
 .../webapp/js/controllers/HomeController.js     |    30 -
 .../webapp/js/lib/angular/angular-animate.js    |  4121 --
 .../js/lib/angular/angular-animate.min.js       |    56 -
 .../js/lib/angular/angular-animate.min.js.map   |     8 -
 .../main/webapp/js/lib/angular/angular-aria.js  |   398 -
 .../webapp/js/lib/angular/angular-aria.min.js   |    14 -
 .../js/lib/angular/angular-aria.min.js.map      |     8 -
 .../webapp/js/lib/angular/angular-cookies.js    |   322 -
 .../js/lib/angular/angular-cookies.min.js       |     9 -
 .../js/lib/angular/angular-cookies.min.js.map   |     8 -
 .../main/webapp/js/lib/angular/angular-csp.css  |    21 -
 .../webapp/js/lib/angular/angular-loader.js     |   484 -
 .../webapp/js/lib/angular/angular-loader.min.js |    10 -
 .../js/lib/angular/angular-loader.min.js.map    |     8 -
 .../js/lib/angular/angular-message-format.js    |   980 -
 .../lib/angular/angular-message-format.min.js   |    26 -
 .../angular/angular-message-format.min.js.map   |     8 -
 .../webapp/js/lib/angular/angular-messages.js   |   687 -
 .../js/lib/angular/angular-messages.min.js      |    12 -
 .../js/lib/angular/angular-messages.min.js.map  |     8 -
 .../main/webapp/js/lib/angular/angular-mocks.js |  2842 --
 .../webapp/js/lib/angular/angular-resource.js   |   768 -
 .../js/lib/angular/angular-resource.min.js      |    15 -
 .../js/lib/angular/angular-resource.min.js.map  |     8 -
 .../main/webapp/js/lib/angular/angular-route.js |  1016 -
 .../webapp/js/lib/angular/angular-route.min.js  |    15 -
 .../js/lib/angular/angular-route.min.js.map     |     8 -
 .../webapp/js/lib/angular/angular-sanitize.js   |   717 -
 .../js/lib/angular/angular-sanitize.min.js      |    15 -
 .../js/lib/angular/angular-sanitize.min.js.map  |     8 -
 .../webapp/js/lib/angular/angular-scenario.js   | 41849 -----------------
 .../main/webapp/js/lib/angular/angular-touch.js |   729 -
 .../webapp/js/lib/angular/angular-touch.min.js  |    14 -
 .../js/lib/angular/angular-touch.min.js.map     |     8 -
 .../src/main/webapp/js/lib/angular/angular.js   | 30428 ------------
 .../main/webapp/js/lib/angular/angular.min.js   |   307 -
 .../webapp/js/lib/angular/angular.min.js.map    |     8 -
 .../src/main/webapp/js/lib/angular/errors.json  |     1 -
 .../js/lib/angular/i18n/angular-locale_aa-dj.js |   128 -
 .../js/lib/angular/i18n/angular-locale_aa-er.js |   128 -
 .../js/lib/angular/i18n/angular-locale_aa-et.js |   128 -
 .../js/lib/angular/i18n/angular-locale_aa.js    |   128 -
 .../js/lib/angular/i18n/angular-locale_af-na.js |   125 -
 .../js/lib/angular/i18n/angular-locale_af-za.js |   125 -
 .../js/lib/angular/i18n/angular-locale_af.js    |   125 -
 .../lib/angular/i18n/angular-locale_agq-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_agq.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ak-gh.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ak.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_am-et.js |   125 -
 .../js/lib/angular/i18n/angular-locale_am.js    |   125 -
 .../lib/angular/i18n/angular-locale_ar-001.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-ae.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-bh.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-dj.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-dz.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-eg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-eh.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-er.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-il.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-iq.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-jo.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-km.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-kw.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-lb.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-ly.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-ma.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-mr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-om.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-ps.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-qa.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-sa.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-sd.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-so.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-ss.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-sy.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-td.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-tn.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar-ye.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ar.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_as-in.js |   143 -
 .../js/lib/angular/i18n/angular-locale_as.js    |   143 -
 .../lib/angular/i18n/angular-locale_asa-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_asa.js   |   143 -
 .../lib/angular/i18n/angular-locale_ast-es.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ast.js   |   143 -
 .../angular/i18n/angular-locale_az-cyrl-az.js   |   125 -
 .../lib/angular/i18n/angular-locale_az-cyrl.js  |   125 -
 .../angular/i18n/angular-locale_az-latn-az.js   |   125 -
 .../lib/angular/i18n/angular-locale_az-latn.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_az.js    |   125 -
 .../lib/angular/i18n/angular-locale_bas-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_bas.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_be-by.js |   125 -
 .../js/lib/angular/i18n/angular-locale_be.js    |   125 -
 .../lib/angular/i18n/angular-locale_bem-zm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_bem.js   |   143 -
 .../lib/angular/i18n/angular-locale_bez-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_bez.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_bg-bg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_bg.js    |   125 -
 .../angular/i18n/angular-locale_bm-latn-ml.js   |   143 -
 .../lib/angular/i18n/angular-locale_bm-latn.js  |   143 -
 .../js/lib/angular/i18n/angular-locale_bm-ml.js |   115 -
 .../js/lib/angular/i18n/angular-locale_bm.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_bn-bd.js |   125 -
 .../js/lib/angular/i18n/angular-locale_bn-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_bn.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_bo-cn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_bo-in.js |   143 -
 .../js/lib/angular/i18n/angular-locale_bo.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_br-fr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_br.js    |   125 -
 .../lib/angular/i18n/angular-locale_brx-in.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_brx.js   |   143 -
 .../angular/i18n/angular-locale_bs-cyrl-ba.js   |   143 -
 .../lib/angular/i18n/angular-locale_bs-cyrl.js  |   143 -
 .../angular/i18n/angular-locale_bs-latn-ba.js   |   143 -
 .../lib/angular/i18n/angular-locale_bs-latn.js  |   143 -
 .../js/lib/angular/i18n/angular-locale_bs.js    |   143 -
 .../lib/angular/i18n/angular-locale_byn-er.js   |   115 -
 .../js/lib/angular/i18n/angular-locale_byn.js   |   115 -
 .../js/lib/angular/i18n/angular-locale_ca-ad.js |   143 -
 .../i18n/angular-locale_ca-es-valencia.js       |   143 -
 .../js/lib/angular/i18n/angular-locale_ca-es.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ca-fr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ca-it.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ca.js    |   143 -
 .../lib/angular/i18n/angular-locale_cgg-ug.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_cgg.js   |   143 -
 .../lib/angular/i18n/angular-locale_chr-us.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_chr.js   |   125 -
 .../angular/i18n/angular-locale_ckb-arab-iq.js  |   143 -
 .../angular/i18n/angular-locale_ckb-arab-ir.js  |   143 -
 .../lib/angular/i18n/angular-locale_ckb-arab.js |   143 -
 .../lib/angular/i18n/angular-locale_ckb-iq.js   |   143 -
 .../lib/angular/i18n/angular-locale_ckb-ir.js   |   143 -
 .../angular/i18n/angular-locale_ckb-latn-iq.js  |   143 -
 .../lib/angular/i18n/angular-locale_ckb-latn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ckb.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_cs-cz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_cs.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_cy-gb.js |   125 -
 .../js/lib/angular/i18n/angular-locale_cy.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_da-dk.js |   156 -
 .../js/lib/angular/i18n/angular-locale_da-gl.js |   156 -
 .../js/lib/angular/i18n/angular-locale_da.js    |   156 -
 .../lib/angular/i18n/angular-locale_dav-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_dav.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_de-at.js |   143 -
 .../js/lib/angular/i18n/angular-locale_de-be.js |   143 -
 .../js/lib/angular/i18n/angular-locale_de-ch.js |   143 -
 .../js/lib/angular/i18n/angular-locale_de-de.js |   143 -
 .../js/lib/angular/i18n/angular-locale_de-li.js |   143 -
 .../js/lib/angular/i18n/angular-locale_de-lu.js |   143 -
 .../js/lib/angular/i18n/angular-locale_de.js    |   143 -
 .../lib/angular/i18n/angular-locale_dje-ne.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_dje.js   |   143 -
 .../lib/angular/i18n/angular-locale_dsb-de.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_dsb.js   |   143 -
 .../lib/angular/i18n/angular-locale_dua-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_dua.js   |   143 -
 .../lib/angular/i18n/angular-locale_dyo-sn.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_dyo.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_dz-bt.js |   143 -
 .../js/lib/angular/i18n/angular-locale_dz.js    |   143 -
 .../lib/angular/i18n/angular-locale_ebu-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ebu.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ee-gh.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ee-tg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ee.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_el-cy.js |   125 -
 .../js/lib/angular/i18n/angular-locale_el-gr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_el.js    |   125 -
 .../lib/angular/i18n/angular-locale_en-001.js   |   143 -
 .../lib/angular/i18n/angular-locale_en-150.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ag.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ai.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-as.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-au.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-bb.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-be.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-bm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-bs.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-bw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-bz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ca.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-cc.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ck.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-cm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-cx.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-dg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-dm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-er.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-fj.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-fk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-fm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gb.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gd.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gh.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gi.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gu.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-gy.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-hk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ie.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-im.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-in.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-io.js |   143 -
 .../lib/angular/i18n/angular-locale_en-iso.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_en-je.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-jm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ke.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ki.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-kn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ky.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-lc.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-lr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ls.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mh.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mo.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mp.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ms.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mt.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mu.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-mw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-my.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-na.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-nf.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ng.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-nr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-nu.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-nz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-pg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ph.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-pk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-pn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-pr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-pw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-rw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sb.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sc.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sd.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sh.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sl.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ss.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sx.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-sz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-tc.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-tk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-to.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-tt.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-tv.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-tz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ug.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-um.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-us.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-vc.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-vg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-vi.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-vu.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-ws.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-za.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-zm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en-zw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_en.js    |   143 -
 .../lib/angular/i18n/angular-locale_eo-001.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_eo.js    |   143 -
 .../lib/angular/i18n/angular-locale_es-419.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ar.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-bo.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-cl.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-co.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-cr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-cu.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-do.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ea.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ec.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-es.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-gq.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-gt.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-hn.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ic.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-mx.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ni.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-pa.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-pe.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ph.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-pr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-py.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-sv.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-us.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-uy.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es-ve.js |   125 -
 .../js/lib/angular/i18n/angular-locale_es.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_et-ee.js |   143 -
 .../js/lib/angular/i18n/angular-locale_et.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_eu-es.js |   125 -
 .../js/lib/angular/i18n/angular-locale_eu.js    |   125 -
 .../lib/angular/i18n/angular-locale_ewo-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ewo.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_fa-af.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fa-ir.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fa.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_ff-cm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ff-gn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ff-mr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ff-sn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ff.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_fi-fi.js |   143 -
 .../js/lib/angular/i18n/angular-locale_fi.js    |   143 -
 .../lib/angular/i18n/angular-locale_fil-ph.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_fil.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_fo-fo.js |   143 -
 .../js/lib/angular/i18n/angular-locale_fo.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_fr-be.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-bf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-bi.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-bj.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-bl.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ca.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-cd.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-cf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-cg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ch.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ci.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-cm.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-dj.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-dz.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-fr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ga.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-gf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-gn.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-gp.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-gq.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ht.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-km.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-lu.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ma.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-mc.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-mf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-mg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ml.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-mq.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-mr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-mu.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-nc.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-ne.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-pf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-pm.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-re.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-rw.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-sc.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-sn.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-sy.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-td.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-tg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-tn.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-vu.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-wf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr-yt.js |   125 -
 .../js/lib/angular/i18n/angular-locale_fr.js    |   125 -
 .../lib/angular/i18n/angular-locale_fur-it.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_fur.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_fy-nl.js |   143 -
 .../js/lib/angular/i18n/angular-locale_fy.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ga-ie.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ga.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_gd-gb.js |   143 -
 .../js/lib/angular/i18n/angular-locale_gd.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_gl-es.js |   143 -
 .../js/lib/angular/i18n/angular-locale_gl.js    |   143 -
 .../lib/angular/i18n/angular-locale_gsw-ch.js   |   125 -
 .../lib/angular/i18n/angular-locale_gsw-fr.js   |   125 -
 .../lib/angular/i18n/angular-locale_gsw-li.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_gsw.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_gu-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_gu.js    |   125 -
 .../lib/angular/i18n/angular-locale_guz-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_guz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_gv-im.js |   143 -
 .../js/lib/angular/i18n/angular-locale_gv.js    |   143 -
 .../angular/i18n/angular-locale_ha-latn-gh.js   |   143 -
 .../angular/i18n/angular-locale_ha-latn-ne.js   |   143 -
 .../angular/i18n/angular-locale_ha-latn-ng.js   |   143 -
 .../lib/angular/i18n/angular-locale_ha-latn.js  |   143 -
 .../js/lib/angular/i18n/angular-locale_ha.js    |   143 -
 .../lib/angular/i18n/angular-locale_haw-us.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_haw.js   |   125 -
 .../js/lib/angular/i18n/angular-locale_he-il.js |   143 -
 .../js/lib/angular/i18n/angular-locale_he.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_hi-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_hi.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_hr-ba.js |   143 -
 .../js/lib/angular/i18n/angular-locale_hr-hr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_hr.js    |   143 -
 .../lib/angular/i18n/angular-locale_hsb-de.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_hsb.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_hu-hu.js |   125 -
 .../js/lib/angular/i18n/angular-locale_hu.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_hy-am.js |   125 -
 .../js/lib/angular/i18n/angular-locale_hy.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_ia-fr.js |   128 -
 .../js/lib/angular/i18n/angular-locale_ia.js    |   128 -
 .../js/lib/angular/i18n/angular-locale_id-id.js |   125 -
 .../js/lib/angular/i18n/angular-locale_id.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_ig-ng.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ig.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ii-cn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ii.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_in.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_is-is.js |   156 -
 .../js/lib/angular/i18n/angular-locale_is.js    |   156 -
 .../js/lib/angular/i18n/angular-locale_it-ch.js |   143 -
 .../js/lib/angular/i18n/angular-locale_it-it.js |   143 -
 .../js/lib/angular/i18n/angular-locale_it-sm.js |   143 -
 .../js/lib/angular/i18n/angular-locale_it.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_iw.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ja-jp.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ja.js    |   125 -
 .../lib/angular/i18n/angular-locale_jgo-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_jgo.js   |   143 -
 .../lib/angular/i18n/angular-locale_jmc-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_jmc.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ka-ge.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ka.js    |   125 -
 .../lib/angular/i18n/angular-locale_kab-dz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kab.js   |   143 -
 .../lib/angular/i18n/angular-locale_kam-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kam.js   |   143 -
 .../lib/angular/i18n/angular-locale_kde-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kde.js   |   143 -
 .../lib/angular/i18n/angular-locale_kea-cv.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kea.js   |   143 -
 .../lib/angular/i18n/angular-locale_khq-ml.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_khq.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ki-ke.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ki.js    |   143 -
 .../angular/i18n/angular-locale_kk-cyrl-kz.js   |   125 -
 .../lib/angular/i18n/angular-locale_kk-cyrl.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_kk.js    |   125 -
 .../lib/angular/i18n/angular-locale_kkj-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kkj.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kl-gl.js |   143 -
 .../js/lib/angular/i18n/angular-locale_kl.js    |   143 -
 .../lib/angular/i18n/angular-locale_kln-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kln.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_km-kh.js |   125 -
 .../js/lib/angular/i18n/angular-locale_km.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_kn-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_kn.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_ko-kp.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ko-kr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ko.js    |   125 -
 .../lib/angular/i18n/angular-locale_kok-in.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kok.js   |   143 -
 .../angular/i18n/angular-locale_ks-arab-in.js   |   143 -
 .../lib/angular/i18n/angular-locale_ks-arab.js  |   143 -
 .../js/lib/angular/i18n/angular-locale_ks.js    |   143 -
 .../lib/angular/i18n/angular-locale_ksb-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ksb.js   |   143 -
 .../lib/angular/i18n/angular-locale_ksf-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ksf.js   |   143 -
 .../lib/angular/i18n/angular-locale_ksh-de.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ksh.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_kw-gb.js |   143 -
 .../js/lib/angular/i18n/angular-locale_kw.js    |   143 -
 .../angular/i18n/angular-locale_ky-cyrl-kg.js   |   125 -
 .../lib/angular/i18n/angular-locale_ky-cyrl.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_ky.js    |   125 -
 .../lib/angular/i18n/angular-locale_lag-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_lag.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_lb-lu.js |   143 -
 .../js/lib/angular/i18n/angular-locale_lb.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_lg-ug.js |   143 -
 .../js/lib/angular/i18n/angular-locale_lg.js    |   143 -
 .../lib/angular/i18n/angular-locale_lkt-us.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_lkt.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ln-ao.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ln-cd.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ln-cf.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ln-cg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ln.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_lo-la.js |   125 -
 .../js/lib/angular/i18n/angular-locale_lo.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_lt-lt.js |   143 -
 .../js/lib/angular/i18n/angular-locale_lt.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_lu-cd.js |   143 -
 .../js/lib/angular/i18n/angular-locale_lu.js    |   143 -
 .../lib/angular/i18n/angular-locale_luo-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_luo.js   |   143 -
 .../lib/angular/i18n/angular-locale_luy-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_luy.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_lv-lv.js |   143 -
 .../js/lib/angular/i18n/angular-locale_lv.js    |   143 -
 .../lib/angular/i18n/angular-locale_mas-ke.js   |   143 -
 .../lib/angular/i18n/angular-locale_mas-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mas.js   |   143 -
 .../lib/angular/i18n/angular-locale_mer-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mer.js   |   143 -
 .../lib/angular/i18n/angular-locale_mfe-mu.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mfe.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mg-mg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_mg.js    |   143 -
 .../lib/angular/i18n/angular-locale_mgh-mz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mgh.js   |   143 -
 .../lib/angular/i18n/angular-locale_mgo-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mgo.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mk-mk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_mk.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ml-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ml.js    |   125 -
 .../angular/i18n/angular-locale_mn-cyrl-mn.js   |   125 -
 .../lib/angular/i18n/angular-locale_mn-cyrl.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_mn.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_mr-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_mr.js    |   125 -
 .../angular/i18n/angular-locale_ms-latn-bn.js   |   125 -
 .../angular/i18n/angular-locale_ms-latn-my.js   |   125 -
 .../angular/i18n/angular-locale_ms-latn-sg.js   |   125 -
 .../lib/angular/i18n/angular-locale_ms-latn.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_ms.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_mt-mt.js |   125 -
 .../js/lib/angular/i18n/angular-locale_mt.js    |   125 -
 .../lib/angular/i18n/angular-locale_mua-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_mua.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_my-mm.js |   125 -
 .../js/lib/angular/i18n/angular-locale_my.js    |   125 -
 .../lib/angular/i18n/angular-locale_naq-na.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_naq.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_nb-no.js |   125 -
 .../js/lib/angular/i18n/angular-locale_nb-sj.js |   125 -
 .../js/lib/angular/i18n/angular-locale_nb.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_nd-zw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nd.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ne-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ne-np.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ne.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_nl-aw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl-be.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl-bq.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl-cw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl-nl.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl-sr.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl-sx.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nl.js    |   143 -
 .../lib/angular/i18n/angular-locale_nmg-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_nmg.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_nn-no.js |   143 -
 .../js/lib/angular/i18n/angular-locale_nn.js    |   143 -
 .../lib/angular/i18n/angular-locale_nnh-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_nnh.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_no-no.js |   125 -
 .../js/lib/angular/i18n/angular-locale_no.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_nr-za.js |   128 -
 .../js/lib/angular/i18n/angular-locale_nr.js    |   128 -
 .../lib/angular/i18n/angular-locale_nso-za.js   |   128 -
 .../js/lib/angular/i18n/angular-locale_nso.js   |   128 -
 .../lib/angular/i18n/angular-locale_nus-sd.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_nus.js   |   143 -
 .../lib/angular/i18n/angular-locale_nyn-ug.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_nyn.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_om-et.js |   143 -
 .../js/lib/angular/i18n/angular-locale_om-ke.js |   143 -
 .../js/lib/angular/i18n/angular-locale_om.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_or-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_or.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_os-ge.js |   143 -
 .../js/lib/angular/i18n/angular-locale_os-ru.js |   143 -
 .../js/lib/angular/i18n/angular-locale_os.js    |   143 -
 .../angular/i18n/angular-locale_pa-arab-pk.js   |   125 -
 .../lib/angular/i18n/angular-locale_pa-arab.js  |   125 -
 .../angular/i18n/angular-locale_pa-guru-in.js   |   125 -
 .../lib/angular/i18n/angular-locale_pa-guru.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_pa.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_pl-pl.js |   143 -
 .../js/lib/angular/i18n/angular-locale_pl.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ps-af.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ps.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_pt-ao.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-br.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-cv.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-gw.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-mo.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-mz.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-pt.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-st.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt-tl.js |   125 -
 .../js/lib/angular/i18n/angular-locale_pt.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_qu-bo.js |   143 -
 .../js/lib/angular/i18n/angular-locale_qu-ec.js |   143 -
 .../js/lib/angular/i18n/angular-locale_qu-pe.js |   143 -
 .../js/lib/angular/i18n/angular-locale_qu.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_rm-ch.js |   143 -
 .../js/lib/angular/i18n/angular-locale_rm.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_rn-bi.js |   143 -
 .../js/lib/angular/i18n/angular-locale_rn.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ro-md.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ro-ro.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ro.js    |   143 -
 .../lib/angular/i18n/angular-locale_rof-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_rof.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ru-by.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ru-kg.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ru-kz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ru-md.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ru-ru.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ru-ua.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ru.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_rw-rw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_rw.js    |   143 -
 .../lib/angular/i18n/angular-locale_rwk-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_rwk.js   |   143 -
 .../lib/angular/i18n/angular-locale_sah-ru.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_sah.js   |   143 -
 .../lib/angular/i18n/angular-locale_saq-ke.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_saq.js   |   143 -
 .../lib/angular/i18n/angular-locale_sbp-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_sbp.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_se-fi.js |   143 -
 .../js/lib/angular/i18n/angular-locale_se-no.js |   143 -
 .../js/lib/angular/i18n/angular-locale_se-se.js |   143 -
 .../js/lib/angular/i18n/angular-locale_se.js    |   143 -
 .../lib/angular/i18n/angular-locale_seh-mz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_seh.js   |   143 -
 .../lib/angular/i18n/angular-locale_ses-ml.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ses.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_sg-cf.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sg.js    |   143 -
 .../angular/i18n/angular-locale_shi-latn-ma.js  |   143 -
 .../lib/angular/i18n/angular-locale_shi-latn.js |   143 -
 .../angular/i18n/angular-locale_shi-tfng-ma.js  |   143 -
 .../lib/angular/i18n/angular-locale_shi-tfng.js |   143 -
 .../js/lib/angular/i18n/angular-locale_shi.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_si-lk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_si.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_sk-sk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sk.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_sl-si.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sl.js    |   143 -
 .../lib/angular/i18n/angular-locale_smn-fi.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_smn.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_sn-zw.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sn.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_so-dj.js |   143 -
 .../js/lib/angular/i18n/angular-locale_so-et.js |   143 -
 .../js/lib/angular/i18n/angular-locale_so-ke.js |   143 -
 .../js/lib/angular/i18n/angular-locale_so-so.js |   143 -
 .../js/lib/angular/i18n/angular-locale_so.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_sq-al.js |   125 -
 .../js/lib/angular/i18n/angular-locale_sq-mk.js |   125 -
 .../js/lib/angular/i18n/angular-locale_sq-xk.js |   125 -
 .../js/lib/angular/i18n/angular-locale_sq.js    |   125 -
 .../angular/i18n/angular-locale_sr-cyrl-ba.js   |   143 -
 .../angular/i18n/angular-locale_sr-cyrl-me.js   |   143 -
 .../angular/i18n/angular-locale_sr-cyrl-rs.js   |   143 -
 .../angular/i18n/angular-locale_sr-cyrl-xk.js   |   143 -
 .../lib/angular/i18n/angular-locale_sr-cyrl.js  |   143 -
 .../angular/i18n/angular-locale_sr-latn-ba.js   |   143 -
 .../angular/i18n/angular-locale_sr-latn-me.js   |   143 -
 .../angular/i18n/angular-locale_sr-latn-rs.js   |   143 -
 .../angular/i18n/angular-locale_sr-latn-xk.js   |   143 -
 .../lib/angular/i18n/angular-locale_sr-latn.js  |   143 -
 .../js/lib/angular/i18n/angular-locale_sr.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ss-sz.js |   128 -
 .../js/lib/angular/i18n/angular-locale_ss-za.js |   128 -
 .../js/lib/angular/i18n/angular-locale_ss.js    |   128 -
 .../lib/angular/i18n/angular-locale_ssy-er.js   |   128 -
 .../js/lib/angular/i18n/angular-locale_ssy.js   |   128 -
 .../js/lib/angular/i18n/angular-locale_st-ls.js |   115 -
 .../js/lib/angular/i18n/angular-locale_st-za.js |   115 -
 .../js/lib/angular/i18n/angular-locale_st.js    |   115 -
 .../js/lib/angular/i18n/angular-locale_sv-ax.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sv-fi.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sv-se.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sv.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_sw-cd.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sw-ke.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sw-tz.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sw-ug.js |   143 -
 .../js/lib/angular/i18n/angular-locale_sw.js    |   143 -
 .../lib/angular/i18n/angular-locale_swc-cd.js   |   128 -
 .../js/lib/angular/i18n/angular-locale_swc.js   |   128 -
 .../js/lib/angular/i18n/angular-locale_ta-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ta-lk.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ta-my.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ta-sg.js |   125 -
 .../js/lib/angular/i18n/angular-locale_ta.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_te-in.js |   125 -
 .../js/lib/angular/i18n/angular-locale_te.js    |   125 -
 .../lib/angular/i18n/angular-locale_teo-ke.js   |   143 -
 .../lib/angular/i18n/angular-locale_teo-ug.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_teo.js   |   143 -
 .../angular/i18n/angular-locale_tg-cyrl-tj.js   |   115 -
 .../lib/angular/i18n/angular-locale_tg-cyrl.js  |   115 -
 .../js/lib/angular/i18n/angular-locale_tg.js    |   115 -
 .../js/lib/angular/i18n/angular-locale_th-th.js |   125 -
 .../js/lib/angular/i18n/angular-locale_th.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_ti-er.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ti-et.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ti.js    |   143 -
 .../lib/angular/i18n/angular-locale_tig-er.js   |   115 -
 .../js/lib/angular/i18n/angular-locale_tig.js   |   115 -
 .../js/lib/angular/i18n/angular-locale_tl.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_tn-bw.js |   128 -
 .../js/lib/angular/i18n/angular-locale_tn-za.js |   128 -
 .../js/lib/angular/i18n/angular-locale_tn.js    |   128 -
 .../js/lib/angular/i18n/angular-locale_to-to.js |   143 -
 .../js/lib/angular/i18n/angular-locale_to.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_tr-cy.js |   125 -
 .../js/lib/angular/i18n/angular-locale_tr-tr.js |   125 -
 .../js/lib/angular/i18n/angular-locale_tr.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_ts-za.js |   128 -
 .../js/lib/angular/i18n/angular-locale_ts.js    |   128 -
 .../lib/angular/i18n/angular-locale_twq-ne.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_twq.js   |   143 -
 .../angular/i18n/angular-locale_tzm-latn-ma.js  |   143 -
 .../lib/angular/i18n/angular-locale_tzm-latn.js |   143 -
 .../js/lib/angular/i18n/angular-locale_tzm.js   |   143 -
 .../angular/i18n/angular-locale_ug-arab-cn.js   |   143 -
 .../lib/angular/i18n/angular-locale_ug-arab.js  |   143 -
 .../js/lib/angular/i18n/angular-locale_ug.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_uk-ua.js |   143 -
 .../js/lib/angular/i18n/angular-locale_uk.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_ur-in.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ur-pk.js |   143 -
 .../js/lib/angular/i18n/angular-locale_ur.js    |   143 -
 .../angular/i18n/angular-locale_uz-arab-af.js   |   125 -
 .../lib/angular/i18n/angular-locale_uz-arab.js  |   125 -
 .../angular/i18n/angular-locale_uz-cyrl-uz.js   |   125 -
 .../lib/angular/i18n/angular-locale_uz-cyrl.js  |   125 -
 .../angular/i18n/angular-locale_uz-latn-uz.js   |   125 -
 .../lib/angular/i18n/angular-locale_uz-latn.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_uz.js    |   125 -
 .../angular/i18n/angular-locale_vai-latn-lr.js  |   143 -
 .../lib/angular/i18n/angular-locale_vai-latn.js |   143 -
 .../angular/i18n/angular-locale_vai-vaii-lr.js  |   143 -
 .../lib/angular/i18n/angular-locale_vai-vaii.js |   143 -
 .../js/lib/angular/i18n/angular-locale_vai.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_ve-za.js |   128 -
 .../js/lib/angular/i18n/angular-locale_ve.js    |   128 -
 .../js/lib/angular/i18n/angular-locale_vi-vn.js |   125 -
 .../js/lib/angular/i18n/angular-locale_vi.js    |   125 -
 .../lib/angular/i18n/angular-locale_vo-001.js   |   128 -
 .../js/lib/angular/i18n/angular-locale_vo.js    |   128 -
 .../lib/angular/i18n/angular-locale_vun-tz.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_vun.js   |   143 -
 .../lib/angular/i18n/angular-locale_wae-ch.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_wae.js   |   143 -
 .../lib/angular/i18n/angular-locale_wal-et.js   |   115 -
 .../js/lib/angular/i18n/angular-locale_wal.js   |   115 -
 .../js/lib/angular/i18n/angular-locale_xh-za.js |   115 -
 .../js/lib/angular/i18n/angular-locale_xh.js    |   115 -
 .../lib/angular/i18n/angular-locale_xog-ug.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_xog.js   |   143 -
 .../lib/angular/i18n/angular-locale_yav-cm.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_yav.js   |   143 -
 .../lib/angular/i18n/angular-locale_yi-001.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_yi.js    |   143 -
 .../js/lib/angular/i18n/angular-locale_yo-bj.js |   143 -
 .../js/lib/angular/i18n/angular-locale_yo-ng.js |   143 -
 .../js/lib/angular/i18n/angular-locale_yo.js    |   143 -
 .../lib/angular/i18n/angular-locale_zgh-ma.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_zgh.js   |   143 -
 .../js/lib/angular/i18n/angular-locale_zh-cn.js |   125 -
 .../angular/i18n/angular-locale_zh-hans-cn.js   |   125 -
 .../angular/i18n/angular-locale_zh-hans-hk.js   |   125 -
 .../angular/i18n/angular-locale_zh-hans-mo.js   |   125 -
 .../angular/i18n/angular-locale_zh-hans-sg.js   |   125 -
 .../lib/angular/i18n/angular-locale_zh-hans.js  |   125 -
 .../angular/i18n/angular-locale_zh-hant-hk.js   |   125 -
 .../angular/i18n/angular-locale_zh-hant-mo.js   |   125 -
 .../angular/i18n/angular-locale_zh-hant-tw.js   |   125 -
 .../lib/angular/i18n/angular-locale_zh-hant.js  |   125 -
 .../js/lib/angular/i18n/angular-locale_zh-hk.js |   125 -
 .../js/lib/angular/i18n/angular-locale_zh-tw.js |   125 -
 .../js/lib/angular/i18n/angular-locale_zh.js    |   125 -
 .../js/lib/angular/i18n/angular-locale_zu-za.js |   125 -
 .../js/lib/angular/i18n/angular-locale_zu.js    |   125 -
 .../src/main/webapp/js/lib/angular/version.json |     1 -
 .../src/main/webapp/js/lib/angular/version.txt  |     1 -
 .../src/main/webapp/js/services/DataService.js  |    74 -
 .../src/main/webapp/partials/home.html          |     6 -
 .../src/main/webapp/partials/projects.html      |     3 -
 .../src/test/java/actions/IndexTest.java        |    37 -
 archetypes/struts2-archetype-blank/README.txt   |    61 -
 archetypes/struts2-archetype-blank/pom.xml      |    87 -
 .../META-INF/maven/archetype-metadata.xml       |    62 -
 .../main/resources/META-INF/maven/archetype.xml |    39 -
 .../resources/archetype-resources/LICENSE.txt   |   174 -
 .../resources/archetype-resources/NOTICE.txt    |     6 -
 .../resources/archetype-resources/README.txt    |    10 -
 .../main/resources/archetype-resources/pom.xml  |   100 -
 .../src/main/java/example/ExampleSupport.java   |    30 -
 .../src/main/java/example/HelloWorld.java       |    61 -
 .../src/main/java/example/Login.java            |    59 -
 .../src/main/resources/example.xml              |    30 -
 .../main/resources/example/Login-validation.xml |    17 -
 .../main/resources/example/package.properties   |     5 -
 .../resources/example/package_es.properties     |     5 -
 .../src/main/resources/log4j2.xml               |    16 -
 .../src/main/resources/struts.xml               |    25 -
 .../main/webapp/WEB-INF/example/HelloWorld.jsp  |    28 -
 .../src/main/webapp/WEB-INF/example/Login.jsp   |    15 -
 .../src/main/webapp/WEB-INF/example/Menu.jsp    |     3 -
 .../src/main/webapp/WEB-INF/example/Missing.jsp |    11 -
 .../main/webapp/WEB-INF/example/Register.jsp    |     3 -
 .../src/main/webapp/WEB-INF/example/Welcome.jsp |    18 -
 .../src/main/webapp/WEB-INF/web.xml             |    23 -
 .../src/main/webapp/index.html                  |    10 -
 .../src/test/java/example/ConfigTest.java       |    97 -
 .../src/test/java/example/HelloWorldTest.java   |    37 -
 .../src/test/java/example/LoginTest.java        |    55 -
 .../struts2-archetype-convention/README.txt     |    59 -
 archetypes/struts2-archetype-convention/pom.xml |    86 -
 .../META-INF/maven/archetype-metadata.xml       |    55 -
 .../main/resources/META-INF/maven/archetype.xml |     7 -
 .../resources/archetype-resources/LICENSE.txt   |   174 -
 .../resources/archetype-resources/NOTICE.txt    |     6 -
 .../resources/archetype-resources/README.txt    |    10 -
 .../main/resources/archetype-resources/pom.xml  |   108 -
 .../src/main/java/InitListener.java             |    25 -
 .../src/main/java/actions/HelloAction.java      |    42 -
 .../src/main/java/actions/Index.java            |    24 -
 .../src/main/resources/log4j2.xml               |    16 -
 .../src/main/resources/package.properties       |     2 -
 .../src/main/resources/package_es.properties    |     2 -
 .../src/main/resources/struts.xml               |    10 -
 .../src/main/webapp/WEB-INF/appengine-web.xml   |     6 -
 .../src/main/webapp/WEB-INF/content/hello.jsp   |    28 -
 .../src/main/webapp/WEB-INF/web.xml             |    25 -
 .../src/main/webapp/index.jsp                   |     1 -
 .../src/test/java/actions/HelloActionTest.java  |    16 -
 .../src/test/java/actions/IndexTest.java        |    14 -
 .../struts2-archetype-dbportlet/README.txt      |    54 -
 archetypes/struts2-archetype-dbportlet/pom.xml  |    86 -
 .../META-INF/maven/archetype-metadata.xml       |    41 -
 .../main/resources/archetype-resources/pom.xml  |   135 -
 .../src/main/java/edit/IndexAction.java         |    46 -
 .../src/main/java/view/IndexAction.java         |    51 -
 .../src/main/resources/log4j2.xml               |    16 -
 .../src/main/resources/struts.xml               |    22 -
 .../main/webapp/WEB-INF/applicationContext.xml  |    20 -
 .../main/webapp/WEB-INF/edit/index-input.jsp    |    10 -
 .../main/webapp/WEB-INF/edit/index-success.jsp  |    22 -
 .../src/main/webapp/WEB-INF/help/index.jsp      |     1 -
 .../src/main/webapp/WEB-INF/portlet.xml         |    63 -
 .../src/main/webapp/WEB-INF/view/index.jsp      |    21 -
 .../src/main/webapp/WEB-INF/web.xml             |    37 -
 .../src/main/webapp/index.jsp                   |     4 -
 archetypes/struts2-archetype-plugin/pom.xml     |    85 -
 .../META-INF/maven/archetype-metadata.xml       |    42 -
 .../resources/archetype-resources/LICENSE.txt   |   174 -
 .../resources/archetype-resources/NOTICE.txt    |     6 -
 .../resources/archetype-resources/README.txt    |    10 -
 .../main/resources/archetype-resources/pom.xml  |    43 -
 .../src/main/java/MyResult.java                 |    48 -
 .../src/main/resources/struts-plugin.xml        |    47 -
 archetypes/struts2-archetype-portlet/README.txt |    52 -
 archetypes/struts2-archetype-portlet/pom.xml    |    79 -
 .../META-INF/maven/archetype-metadata.xml       |    41 -
 .../main/resources/archetype-resources/pom.xml  |    91 -
 .../src/main/java/HelloAction.java              |    36 -
 .../src/main/java/UpdateNameAction.java         |    54 -
 .../src/main/resources/struts.xml               |    23 -
 .../src/main/webapp/WEB-INF/jsp/edit/index.jsp  |    13 -
 .../src/main/webapp/WEB-INF/jsp/view/index.jsp  |     9 -
 .../src/main/webapp/WEB-INF/portlet.xml         |    62 -
 .../src/main/webapp/WEB-INF/web.xml             |    21 -
 archetypes/struts2-archetype-starter/README.txt |    66 -
 archetypes/struts2-archetype-starter/pom.xml    |    88 -
 .../META-INF/maven/archetype-metadata.xml       |    53 -
 .../main/resources/archetype-resources/pom.xml  |   133 -
 .../src/main/java/DateConverter.java            |    50 -
 .../src/main/java/HelloWorldAction.java         |    45 -
 .../src/main/java/IndexAction.java              |    38 -
 .../src/main/resources/applicationContext.xml   |    10 -
 .../main/resources/globalmessages.properties    |     5 -
 .../src/main/resources/log4j2.xml               |    17 -
 .../src/main/resources/struts.properties        |   130 -
 .../src/main/resources/struts.xml               |    25 -
 .../main/resources/xwork-conversion.properties  |     4 -
 .../src/main/webapp/WEB-INF/decorators.xml      |    18 -
 .../src/main/webapp/WEB-INF/decorators/main.jsp |    86 -
 .../src/main/webapp/WEB-INF/dwr.xml             |    22 -
 .../src/main/webapp/WEB-INF/jsp/helloWorld.jsp  |    16 -
 .../src/main/webapp/WEB-INF/jsp/index.jsp       |    20 -
 .../src/main/webapp/WEB-INF/sitemesh.xml        |    50 -
 .../src/main/webapp/WEB-INF/web.xml             |    76 -
 .../src/main/webapp/index.jsp                   |     2 -
 .../src/main/webapp/styles/forms.css            |   100 -
 .../src/main/webapp/styles/layout-1col.css      |    27 -
 .../main/webapp/styles/layout-navleft-1col.css  |    31 -
 .../main/webapp/styles/layout-navleft-2col.css  |    39 -
 .../main/webapp/styles/layout-navtop-1col.css   |    32 -
 .../main/webapp/styles/layout-navtop-3col.css   |    43 -
 .../webapp/styles/layout-navtop-localleft.css   |    36 -
 .../webapp/styles/layout-navtop-subright.css    |    36 -
 .../src/main/webapp/styles/layout.css           |   125 -
 .../src/main/webapp/styles/main.css             |    21 -
 .../src/main/webapp/styles/nav-horizontal.css   |    80 -
 .../src/main/webapp/styles/nav-vertical.css     |    79 -
 .../src/main/webapp/styles/tools.css            |    68 -
 .../src/main/webapp/styles/typo.css             |   177 -
 .../src/test/java/HelloWorldActionTest.java     |    33 -
 .../src/test/java/IndexActionTest.java          |    32 -
 .../src/test/resources/test.properties          |     4 -
 assembly/pom.xml                                |     2 +-
 assembly/src/main/assembly/all.xml              |    29 -
 assembly/src/main/assembly/apps.xml             |     7 -
 assembly/src/main/assembly/lib.xml              |     7 -
 assembly/src/main/assembly/min-lib.xml          |     7 +-
 assembly/src/main/assembly/src.xml              |    16 -
 bom/pom.xml                                     |     9 +-
 bundles/admin/pom.xml                           |     2 +-
 bundles/demo/pom.xml                            |     2 +-
 bundles/pom.xml                                 |     2 +-
 core/pom.xml                                    |    14 +-
 .../com/opensymphony/xwork2/ActionSupport.java  |     4 -
 .../xwork2/DefaultActionInvocation.java         |     2 +-
 .../opensymphony/xwork2/DefaultActionProxy.java |    14 +-
 .../com/opensymphony/xwork2/XWorkMessages.java  |    31 -
 .../xwork2/config/entities/PackageConfig.java   |     7 +
 .../xwork2/conversion/impl/XWorkConverter.java  |     2 +-
 .../StaticParametersInterceptor.java            |     2 +-
 .../com/opensymphony/xwork2/ognl/OgnlUtil.java  |    64 +
 .../xwork2/util/LocalizedTextUtil.java          |     8 +-
 .../xwork2/util/finder/DefaultClassFinder.java  |    44 +-
 .../validator/DelegatingValidatorContext.java   |     2 +-
 .../validator/validators/URLValidator.java      |     2 +-
 .../struts2/components/DoubleListUIBean.java    |     2 +-
 .../org/apache/struts2/components/I18n.java     |    38 +-
 .../apache/struts2/components/ListUIBean.java   |     2 +-
 .../struts2/components/ServletUrlRenderer.java  |     2 +-
 .../java/org/apache/struts2/components/Set.java |     2 +-
 .../dispatcher/DefaultStaticContentLoader.java  |    18 +-
 .../dispatcher/mapper/DefaultActionMapper.java  |     2 +-
 .../struts2/factory/StrutsResultFactory.java    |     2 +-
 .../org/apache/struts2/result/StreamResult.java |    64 +-
 .../struts2/views/freemarker/tags/TagModel.java |     2 +-
 .../xwork2/xwork-messages.properties            |     2 +-
 .../resources/template/xhtml/controlheader.ftl  |     7 +-
 .../main/resources/template/xhtml/styles.css    |     7 +
 .../opensymphony/xwork2/ActionSupportTest.java  |     5 +-
 .../xwork2/DefaultActionProxyTest.java          |    24 +
 .../opensymphony/xwork2/ognl/OgnlUtilTest.java  |    15 +
 .../xwork2/ognl/SecurityMemberAccessTest.java   |    32 +-
 .../xwork2/util/LocalizedTextUtilTest.java      |    13 +-
 .../xwork2/validator/URLValidatorTest.java      |     1 +
 .../apache/struts2/components/UIBeanTest.java   |    17 -
 .../mapper/DefaultActionMapperTest.java         |    12 +-
 .../apache/struts2/result/StreamResultTest.java |    10 +-
 .../struts2/views/jsp/ui/TextfieldTest.java     |    16 +
 .../struts2/views/jsp/ui/CheckboxList-1.txt     |     2 +-
 .../struts2/views/jsp/ui/CheckboxList-2.txt     |     2 +-
 .../struts2/views/jsp/ui/CheckboxList-3.txt     |     2 +-
 .../struts2/views/jsp/ui/CheckboxList-4.txt     |     2 +-
 .../apache/struts2/views/jsp/ui/ComboBox-1.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/ComboBox-2.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/ComboBox-3.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/ComboBox-4.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Component-2.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Component-3.txt |     2 +-
 .../struts2/views/jsp/ui/DoubleSelect-1.txt     |     2 +-
 .../struts2/views/jsp/ui/DoubleSelect-2.txt     |     2 +-
 .../struts2/views/jsp/ui/DoubleSelect-3.txt     |     2 +-
 .../struts2/views/jsp/ui/DoubleSelect-4.txt     |     2 +-
 .../org/apache/struts2/views/jsp/ui/File-1.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Formtag-11.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Formtag-2.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/Formtag-22.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Formtag-24.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Formtag-27.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Formtag-6.txt   |     2 +-
 .../org/apache/struts2/views/jsp/ui/Label-1.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Label-2.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Label-3.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Label-4.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Label-5.txt |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-1.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-2.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-3.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-4.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-5.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-6.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/OptGroup-7.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Password-1.txt  |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-1.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-2.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-3.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-4.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-5.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-6.txt |     2 +-
 .../org/apache/struts2/views/jsp/ui/Radio-7.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Select-1.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-10.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/Select-11.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/Select-12.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/Select-13.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/Select-2.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-3.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-4.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-5.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-6.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-7.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-8.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Select-9.txt    |     2 +-
 .../apache/struts2/views/jsp/ui/Textarea-1.txt  |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-1.txt |     2 +-
 .../struts2/views/jsp/ui/Textfield-12.txt       |     2 +-
 .../struts2/views/jsp/ui/Textfield-13.txt       |     2 +-
 .../struts2/views/jsp/ui/Textfield-14.txt       |     4 +
 .../apache/struts2/views/jsp/ui/Textfield-2.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-3.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-4.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-5.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-6.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-7.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-8.txt |     2 +-
 .../apache/struts2/views/jsp/ui/Textfield-9.txt |     2 +-
 .../views/jsp/ui/inputtransferselect-1.txt      |     4 +-
 .../views/jsp/ui/optiontransferselect-1.txt     |     2 +-
 .../views/jsp/ui/optiontransferselect-2.txt     |     2 +-
 .../views/jsp/ui/optiontransferselect-3.txt     |     2 +-
 .../views/jsp/ui/optiontransferselect-4.txt     |     2 +-
 .../views/jsp/ui/optiontransferselect-5.txt     |     2 +-
 .../views/jsp/ui/optiontransferselect-6.txt     |     2 +-
 .../views/jsp/ui/optiontransferselect-7.txt     |     2 +-
 .../apache/struts2/views/jsp/ui/tooltip-1.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/tooltip-2.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/tooltip-3.txt   |     2 +-
 .../apache/struts2/views/jsp/ui/tooltip-4.txt   |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-1.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-10.txt |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-11.txt |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-2.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-3.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-4.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-5.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-6.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-7.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-8.txt  |     2 +-
 .../struts2/views/jsp/ui/updownselecttag-9.txt  |     2 +-
 .../struts2/views/jsp/ui/validationstyles-1.txt |     2 +-
 .../struts2/views/jsp/ui/validationstyles-2.txt |     2 +-
 .../struts2/views/jsp/ui/validationstyles-3.txt |     2 +-
 .../struts-object-factory-result-builder.xml    |     4 +-
 plugins/bean-validation/pom.xml                 |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/cdi/pom.xml                             |     2 +-
 .../cdi/src/main/resources/struts-plugin.xml    |     4 +-
 plugins/config-browser/pom.xml                  |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/convention/pom.xml                      |     2 +-
 .../convention/ConventionUnknownHandler.java    |     7 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/dwr/pom.xml                             |     2 +-
 plugins/embeddedjsp/pom.xml                     |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/gxp/pom.xml                             |     2 +-
 .../gxp/src/main/resources/struts-plugin.xml    |     4 +-
 plugins/jasperreports/pom.xml                   |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/java8-support/README.adoc               |    11 -
 plugins/java8-support/pom.xml                   |    60 -
 .../struts2/convention/Java8ClassFinder.java    |   572 -
 .../convention/Java8ClassFinderFactory.java     |    48 -
 .../src/main/resources/LICENSE.txt              |   174 -
 .../java8-support/src/main/resources/NOTICE.txt |     5 -
 .../src/main/resources/struts-plugin.xml        |    33 -
 plugins/java8-support/src/site/site.xml         |    57 -
 plugins/javatemplates/pom.xml                   |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/jfreechart/pom.xml                      |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/json/pom.xml                            |     2 +-
 .../apache/struts2/json/JSONInterceptor.java    |   162 +-
 .../json/src/main/resources/struts-plugin.xml   |     4 +-
 .../struts2/json/JSONInterceptorTest.java       |    37 +-
 plugins/junit/pom.xml                           |     2 +-
 .../struts-convention-configuration.xml         |     4 +-
 plugins/osgi/pom.xml                            |     2 +-
 .../osgi/src/main/resources/struts-plugin.xml   |     4 +-
 plugins/oval/pom.xml                            |     2 +-
 .../oval/src/main/resources/struts-plugin.xml   |     4 +-
 plugins/pell-multipart/pom.xml                  |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/plexus/pom.xml                          |     2 +-
 .../plexus/src/main/resources/struts-plugin.xml |     4 +-
 plugins/pom.xml                                 |     3 +-
 plugins/portlet-tiles/pom.xml                   |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/portlet/pom.xml                         |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/portlet/src/test/resources/struts.xml   |     4 +-
 plugins/rest/pom.xml                            |     2 +-
 plugins/sitegraph/pom.xml                       |     2 +-
 plugins/sitemesh/pom.xml                        |     2 +-
 .../src/main/resources/struts-plugin.xml        |     4 +-
 plugins/spring/pom.xml                          |     2 +-
 .../spring/src/main/resources/struts-plugin.xml |     4 +-
 plugins/testng/pom.xml                          |     2 +-
 plugins/tiles/pom.xml                           |     2 +-
 .../tiles/src/main/resources/struts-plugin.xml  |     4 +-
 pom.xml                                         |    41 +-
 1250 files changed, 618 insertions(+), 198103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/70fdc00f/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
----------------------------------------------------------------------


[03/50] [abbrv] struts git commit: fix for WW-4573

Posted by lu...@apache.org.
fix for WW-4573

NPE/ concurrent modification exception

using a CopyOnWriteArrayList. This is to keep Memory consistency on the
ValueStack.


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

Branch: refs/heads/master
Commit: 8d4bb890abb004a70a539ad4a3d0fc51dd53b407
Parents: 3a29bc3
Author: Victor Sosa <vi...@gmail.com>
Authored: Sat Jan 2 15:18:37 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:17:09 2016 +0100

----------------------------------------------------------------------
 core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/8d4bb890/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java b/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java
index e548a00..49b47da 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java
@@ -15,7 +15,6 @@
  */
 package com.opensymphony.xwork2.util;
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 


[35/50] [abbrv] struts git commit: Extends logging

Posted by lu...@apache.org.
Extends logging


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

Branch: refs/heads/master
Commit: e53a119c2cd6929883e22e8b4bcf06d6b7e46a9b
Parents: 828b237
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Wed Jan 13 17:22:36 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../struts2/tiles/StrutsFreeMarkerAttributeRenderer.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/e53a119c/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 fbc5416..0b19b1d 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
@@ -51,7 +51,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
     @Override
     public void render(String path, Request request) throws IOException {
         if (path != null) {
-            LOG.trace("Rendering freemarker tile ...");
+            LOG.trace("Rendering freemarker tile [{}]", path);
 
             ActionContext ctx = readActionContext(request);
 
@@ -83,6 +83,8 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
     protected ActionContext readActionContext(Request request) {
         ActionContext ctx = null;
 
+        LOG.debug("Obtaining HttpServletRequest based on [{}]", request.getClass().getName());
+
         if (request instanceof ServletRequest) {
             HttpServletRequest httpRequest = ((ServletRequest) request).getRequest();
             ctx = ServletActionContext.getActionContext(httpRequest);
@@ -93,6 +95,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
         }
 
         if (ctx == null) {
+            LOG.error("Cannot obtain HttpServletRequest from [{}]", request.getClass().getName());
             throw new ConfigurationException("There is no ActionContext for current request!");
         }
 
@@ -101,6 +104,7 @@ public class StrutsFreeMarkerAttributeRenderer implements Renderer {
 
     @Override
     public boolean isRenderable(String path, Request request) {
+        LOG.trace("Checking if path [{}] can be rendered", path);
         return path != null && path.startsWith("/") && path.endsWith(".ftl");
     }
 


[09/50] [abbrv] struts git commit: Update JasperReportsResult.java

Posted by lu...@apache.org.
Update JasperReportsResult.java


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

Branch: refs/heads/master
Commit: bccf099c0470925bb0d971a76915839dfdfef62d
Parents: 8966787
Author: victor sosa <vi...@users.noreply.github.com>
Authored: Mon Jan 4 12:23:44 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../struts2/views/jasperreports/JasperReportsResult.java       | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/bccf099c/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index e0ea121..e356506 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -385,12 +385,6 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
         } catch (JRException e) {
             LOG.error("Error producing {} report for uri {}", format, systemId, e);
             throw new ServletException(e.getMessage(), e);
-        } finally {
-            try {
-                conn.close();
-            } catch (Exception e) {
-                LOG.warn("Could not close db connection properly", e);
-            }
         }
 
         response.setContentLength(output.size());


[45/50] [abbrv] struts git commit: Merge branch 'master' into http-parameters

Posted by lu...@apache.org.
Merge branch 'master' into http-parameters

Conflicts:
	core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java


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

Branch: refs/heads/master
Commit: abd8c6bfb5fc3a9e3f9f3767bb10acd9b7c4836d
Parents: 8b60785 3163d6c
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 19 16:21:00 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:21:00 2016 +0100

----------------------------------------------------------------------
 .../org/apache/struts2/json/JSONResultTest.java | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------



[20/50] [abbrv] struts git commit: Adjusts code to Tiles 3

Posted by lu...@apache.org.
Adjusts code to Tiles 3


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

Branch: refs/heads/master
Commit: 9249aacded1449c967c76ae58985e4dd22274d48
Parents: 0737d72
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 10:13:51 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:42 2016 +0100

----------------------------------------------------------------------
 .../StrutsFreeMarkerAttributeRenderer.java      |  75 ++++-----
 .../tiles/StrutsTilesContainerFactory.java      | 163 +++++++------------
 .../struts2/tiles/StrutsTilesInitializer.java   |   6 +-
 ...sWildcardServletTilesApplicationContext.java |  34 ++--
 4 files changed, 110 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/9249aacd/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..48592e0 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
@@ -33,68 +33,53 @@ 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 org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.Renderer;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 
-public class StrutsFreeMarkerAttributeRenderer extends AbstractTypeDetectingAttributeRenderer {
+public class StrutsFreeMarkerAttributeRenderer implements Renderer {
 
     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!");
-                }
-
-                registerTilesBeanModel(ctx);
-
-                String include = (String) value;
-                FreemarkerResult result = new FreemarkerResult(include);
-                result.setWriter(request.getWriter());
-
-                Container container = ctx.getContainer();
-                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());
-                    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));
+    public void render(String path, Request request) throws IOException {
+        if (path != null) {
+            LOG.trace("Rendering freemarker tile ...");
+
+            ActionContext ctx = ServletActionContext.getActionContext((HttpServletRequest) request);
+            if (ctx == null) {
+                throw new ConfigurationException("There is no ActionContext for current request!");
+            }
+
+            registerTilesBeanModel(ctx);
+
+            FreemarkerResult result = new FreemarkerResult(path);
+            result.setWriter(request.getWriter());
+
+            Container container = ctx.getContainer();
+            container.inject(result);
+
+            try {
+                ActionInvocation invocation = ctx.getActionInvocation();
+                result.doExecute(path, invocation);
+            } catch (TemplateException e) {
+                LOG.error("Exception was thrown during rendering value {}: {}", path, e.getMessage());
+                throw new InvalidTemplateException(e);
             }
         } else {
-            LOG.error("Value is null, cannot render template!");
+            LOG.error("Path 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;
+    @Override
+    public boolean isRenderable(String path, Request request) {
+        return path != null && path.startsWith("/") && path.endsWith(".ftl");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/struts/blob/9249aacd/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 785082b..2c9b094 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
@@ -22,13 +22,8 @@ package org.apache.struts2.tiles;
 import ognl.OgnlException;
 import ognl.OgnlRuntime;
 import ognl.PropertyAccessor;
-import org.apache.tiles.TilesApplicationContext;
 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;
 import org.apache.tiles.definition.pattern.PrefixedPatternDefinitionResolver;
@@ -36,6 +31,7 @@ import org.apache.tiles.definition.pattern.regexp.RegexpDefinitionPatternMatcher
 import org.apache.tiles.definition.pattern.wildcard.WildcardDefinitionPatternMatcherFactory;
 import org.apache.tiles.el.ELAttributeEvaluator;
 import org.apache.tiles.el.JspExpressionFactoryFactory;
+import org.apache.tiles.el.ScopeELResolver;
 import org.apache.tiles.el.TilesContextBeanELResolver;
 import org.apache.tiles.el.TilesContextELResolver;
 import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
@@ -43,25 +39,22 @@ import org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory;
 import org.apache.tiles.evaluator.impl.DirectAttributeEvaluator;
 import org.apache.tiles.factory.BasicTilesContainerFactory;
 import org.apache.tiles.factory.TilesContainerFactoryException;
-import org.apache.tiles.freemarker.context.FreeMarkerTilesRequestContextFactory;
-import org.apache.tiles.impl.BasicTilesContainer;
 import org.apache.tiles.impl.mgmt.CachingTilesContainer;
 import org.apache.tiles.locale.LocaleResolver;
-import org.apache.tiles.ognl.ApplicationScopeNestedObjectExtractor;
+import org.apache.tiles.ognl.AnyScopePropertyAccessor;
 import org.apache.tiles.ognl.DelegatePropertyAccessor;
 import org.apache.tiles.ognl.NestedObjectDelegatePropertyAccessor;
 import org.apache.tiles.ognl.OGNLAttributeEvaluator;
 import org.apache.tiles.ognl.PropertyAccessorDelegateFactory;
-import org.apache.tiles.ognl.RequestScopeNestedObjectExtractor;
-import org.apache.tiles.ognl.SessionScopeNestedObjectExtractor;
+import org.apache.tiles.ognl.ScopePropertyAccessor;
 import org.apache.tiles.ognl.TilesApplicationContextNestedObjectExtractor;
 import org.apache.tiles.ognl.TilesContextPropertyAccessorDelegateFactory;
-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 org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.BasicRendererFactory;
+import org.apache.tiles.request.render.ChainedDelegateRenderer;
+import org.apache.tiles.request.render.Renderer;
 
 import javax.el.ArrayELResolver;
 import javax.el.BeanELResolver;
@@ -70,12 +63,11 @@ 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.ArrayList;
+import java.util.Collection;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * Dedicated Struts factory to build Tiles container with support for:
@@ -106,76 +98,42 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
     public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
 
     @Override
-    protected BasicTilesContainer instantiateContainer(TilesApplicationContext applicationContext) {
-        CachingTilesContainer tilesContainer = new CachingTilesContainer();
-        ServletContext servletContext = (ServletContext) applicationContext.getContext();
-        ServletUtil.setContainer(servletContext, tilesContainer);
-        return tilesContainer;
-    }
-
-    @Override
-    protected List<TilesRequestContextFactory> getTilesRequestContextFactoriesToBeChained(ChainedTilesRequestContextFactory parent) {
-
-        List<TilesRequestContextFactory> factories = super.getTilesRequestContextFactoriesToBeChained(parent);
-
-        registerRequestContextFactory(FreeMarkerTilesRequestContextFactory.class.getName(), factories, parent);
-
-        return factories;
+    public TilesContainer createDecoratedContainer(TilesContainer originalContainer, ApplicationContext applicationContext) {
+        return new CachingTilesContainer(originalContainer);
     }
 
     @Override
     protected void registerAttributeRenderers(
-            BasicRendererFactory rendererFactory,
-            TilesApplicationContext applicationContext,
-            TilesRequestContextFactory contextFactory,
-            TilesContainer container,
-            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+            final BasicRendererFactory rendererFactory,
+            final ApplicationContext applicationContext,
+            final TilesContainer container,
+            final AttributeEvaluatorFactory attributeEvaluatorFactory) {
 
-        super.registerAttributeRenderers(
-                rendererFactory,
-                applicationContext,
-                contextFactory,
-                container,
-                attributeEvaluatorFactory);
+        super.registerAttributeRenderers(rendererFactory, applicationContext, container, attributeEvaluatorFactory);
 
         StrutsFreeMarkerAttributeRenderer freemarkerRenderer = new StrutsFreeMarkerAttributeRenderer();
-        freemarkerRenderer.setApplicationContext(applicationContext);
-        freemarkerRenderer.setAttributeEvaluatorFactory(attributeEvaluatorFactory);
-        freemarkerRenderer.setRequestContextFactory(contextFactory);
 
         rendererFactory.registerRenderer(FREEMARKER_RENDERER_NAME, freemarkerRenderer);
     }
 
     @Override
-    protected AttributeRenderer createDefaultAttributeRenderer(
+    protected Renderer createDefaultAttributeRenderer(
             BasicRendererFactory rendererFactory,
-            TilesApplicationContext applicationContext,
-            TilesRequestContextFactory contextFactory,
+            ApplicationContext applicationContext,
             TilesContainer container,
             AttributeEvaluatorFactory attributeEvaluatorFactory) {
 
-        ChainedDelegateAttributeRenderer retValue = new ChainedDelegateAttributeRenderer();
-
-        retValue.addAttributeRenderer((TypeDetectingAttributeRenderer) rendererFactory
-                .getRenderer(DEFINITION_RENDERER_NAME));
-        retValue.addAttributeRenderer((TypeDetectingAttributeRenderer) rendererFactory
-                .getRenderer(FREEMARKER_RENDERER_NAME));
-        retValue.addAttributeRenderer((TypeDetectingAttributeRenderer) rendererFactory
-                .getRenderer(TEMPLATE_RENDERER_NAME));
-        retValue.addAttributeRenderer((TypeDetectingAttributeRenderer) rendererFactory
-                .getRenderer(STRING_RENDERER_NAME));
-
-        retValue.setApplicationContext(applicationContext);
-        retValue.setRequestContextFactory(contextFactory);
-        retValue.setAttributeEvaluatorFactory(attributeEvaluatorFactory);
-
+        ChainedDelegateRenderer retValue = new ChainedDelegateRenderer();
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(DEFINITION_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(FREEMARKER_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(TEMPLATE_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(STRING_RENDERER_NAME));
         return retValue;
     }
 
     @Override
     protected AttributeEvaluatorFactory createAttributeEvaluatorFactory(
-            TilesApplicationContext applicationContext,
-            TilesRequestContextFactory contextFactory,
+            ApplicationContext applicationContext,
             LocaleResolver resolver) {
 
         BasicAttributeEvaluatorFactory attributeEvaluatorFactory = new BasicAttributeEvaluatorFactory(new DirectAttributeEvaluator());
@@ -187,26 +145,30 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
 
     @Override
     protected <T> PatternDefinitionResolver<T> createPatternDefinitionResolver(Class<T> customizationKeyClass) {
-
         DefinitionPatternMatcherFactory wildcardFactory = new WildcardDefinitionPatternMatcherFactory();
         DefinitionPatternMatcherFactory regexpFactory = new RegexpDefinitionPatternMatcherFactory();
+        PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<>();
 
-        PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<T>();
-        resolver.registerDefinitionPatternMatcherFactory(PATTERN_WILDCARD, wildcardFactory);
-        resolver.registerDefinitionPatternMatcherFactory(PATTERN_REGEXP, regexpFactory);
+        resolver.registerDefinitionPatternMatcherFactory("WILDCARD", wildcardFactory);
+        resolver.registerDefinitionPatternMatcherFactory("REGEXP", regexpFactory);
 
         return resolver;
     }
 
     @Override
-    protected List<URL> getSourceURLs(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory) {
-        try {
-            Set<URL> finalSet = applicationContext.getResources(getTilesDefinitionPattern(applicationContext.getInitParams()));
-
-            return URLUtil.getBaseTilesDefinitionURLs(finalSet);
-        } catch (IOException e) {
-            throw new DefinitionsFactoryException("Cannot load definition URLs", e);
+    protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
+        Collection<ApplicationResource> resources = applicationContext.getResources(getTilesDefinitionPattern(applicationContext.getInitParams()));
+
+        List<ApplicationResource> filteredResources = new ArrayList<>();
+        if (resources != null) {
+            for (ApplicationResource resource : resources) {
+                if (Locale.ROOT.equals(resource.getLocale())) {
+                    filteredResources.add(resource);
+                }
+            }
         }
+
+        return filteredResources;
     }
 
     protected String getTilesDefinitionPattern(Map<String, String> params) {
@@ -216,55 +178,40 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
         return TILES_DEFAULT_PATTERN;
     }
 
-    protected ELAttributeEvaluator createELEvaluator(TilesApplicationContext applicationContext) {
-
+    protected ELAttributeEvaluator createELEvaluator(ApplicationContext applicationContext) {
         ELAttributeEvaluator evaluator = new ELAttributeEvaluator();
-        evaluator.setApplicationContext(applicationContext);
         JspExpressionFactoryFactory efFactory = new JspExpressionFactoryFactory();
         efFactory.setApplicationContext(applicationContext);
         evaluator.setExpressionFactory(efFactory.getExpressionFactory());
-
         ELResolver elResolver = new CompositeELResolver() {
             {
-                add(new TilesContextELResolver());
+                BeanELResolver beanElResolver = new BeanELResolver(false);
+                add(new ScopeELResolver());
+                add(new TilesContextELResolver(beanElResolver));
                 add(new TilesContextBeanELResolver());
                 add(new ArrayELResolver(false));
                 add(new ListELResolver(false));
                 add(new MapELResolver(false));
                 add(new ResourceBundleELResolver());
-                add(new BeanELResolver(false));
+                add(beanElResolver);
             }
         };
-
         evaluator.setResolver(elResolver);
-
         return evaluator;
     }
 
     protected OGNLAttributeEvaluator createOGNLEvaluator() {
         try {
             PropertyAccessor objectPropertyAccessor = OgnlRuntime.getPropertyAccessor(Object.class);
-            PropertyAccessor mapPropertyAccessor = OgnlRuntime.getPropertyAccessor(Map.class);
-            PropertyAccessor applicationContextPropertyAccessor =
-                    new NestedObjectDelegatePropertyAccessor<>(
-                            new TilesApplicationContextNestedObjectExtractor(),
-                            objectPropertyAccessor);
-            PropertyAccessor requestScopePropertyAccessor =
-                    new NestedObjectDelegatePropertyAccessor<>(
-                            new RequestScopeNestedObjectExtractor(), mapPropertyAccessor);
-            PropertyAccessor sessionScopePropertyAccessor =
-                    new NestedObjectDelegatePropertyAccessor<>(
-                            new SessionScopeNestedObjectExtractor(), mapPropertyAccessor);
-            PropertyAccessor applicationScopePropertyAccessor =
-                    new NestedObjectDelegatePropertyAccessor<>(
-                            new ApplicationScopeNestedObjectExtractor(), mapPropertyAccessor);
-            PropertyAccessorDelegateFactory<TilesRequestContext> factory =
-                    new TilesContextPropertyAccessorDelegateFactory(
-                            objectPropertyAccessor, applicationContextPropertyAccessor,
-                            requestScopePropertyAccessor, sessionScopePropertyAccessor,
-                            applicationScopePropertyAccessor);
+            PropertyAccessor applicationContextPropertyAccessor = new NestedObjectDelegatePropertyAccessor<>(
+                    new TilesApplicationContextNestedObjectExtractor(), objectPropertyAccessor);
+            PropertyAccessor anyScopePropertyAccessor = new AnyScopePropertyAccessor();
+            PropertyAccessor scopePropertyAccessor = new ScopePropertyAccessor();
+            PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                    objectPropertyAccessor, applicationContextPropertyAccessor, anyScopePropertyAccessor,
+                    scopePropertyAccessor);
             PropertyAccessor tilesRequestAccessor = new DelegatePropertyAccessor<>(factory);
-            OgnlRuntime.setPropertyAccessor(TilesRequestContext.class, tilesRequestAccessor);
+            OgnlRuntime.setPropertyAccessor(Request.class, tilesRequestAccessor);
             return new OGNLAttributeEvaluator();
         } catch (OgnlException e) {
             throw new TilesContainerFactoryException("Cannot initialize OGNL evaluator", e);

http://git-wip-us.apache.org/repos/asf/struts/blob/9249aacd/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 0ff33c7..37fe1d1 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
@@ -21,8 +21,8 @@ package org.apache.struts2.tiles;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.tiles.TilesApplicationContext;
 import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
 import org.apache.tiles.startup.AbstractTilesInitializer;
 
 import javax.servlet.ServletContext;
@@ -32,13 +32,13 @@ public class StrutsTilesInitializer extends AbstractTilesInitializer {
     private static final Logger LOG = LogManager.getLogger(StrutsTilesInitializer.class);
 
     @Override
-    protected TilesApplicationContext createTilesApplicationContext(TilesApplicationContext preliminaryContext) {
+    protected ApplicationContext createTilesApplicationContext(ApplicationContext preliminaryContext) {
         LOG.debug("Initializing Tiles wildcard support ...");
         return new StrutsWildcardServletTilesApplicationContext((ServletContext) preliminaryContext.getContext());
     }
 
     @Override
-    protected AbstractTilesContainerFactory createContainerFactory(TilesApplicationContext context) {
+    protected AbstractTilesContainerFactory createContainerFactory(ApplicationContext context) {
         LOG.trace("Creating dedicated Struts factory to create Tiles container");
         return new StrutsTilesContainerFactory();
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/9249aacd/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 2328f06..d942e96 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
@@ -24,20 +24,24 @@ import com.opensymphony.xwork2.util.WildcardUtil;
 import com.opensymphony.xwork2.util.finder.ResourceFinder;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
+import org.apache.logging.log4j.message.MessageFormatMessage;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+import org.apache.tiles.request.servlet.ServletApplicationContext;
 
 import javax.servlet.ServletContext;
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Collection;
 import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.regex.Pattern;
 
-public class StrutsWildcardServletTilesApplicationContext extends ServletTilesApplicationContext {
+public class StrutsWildcardServletTilesApplicationContext extends ServletApplicationContext {
 
     private static final Logger LOG = LogManager.getLogger(StrutsWildcardServletTilesApplicationContext.class);
 
@@ -70,36 +74,42 @@ public class StrutsWildcardServletTilesApplicationContext extends ServletTilesAp
         finder = new ResourceFinder(urls.toArray(new URL[urls.size()]));
     }
 
-    public Set<URL> getResources(String path) throws IOException {
-        Set<URL> resources = new HashSet<>();
+    public Collection<ApplicationResource> getResources(String path) {
+        Set<ApplicationResource> resources = new HashSet<>();
 
         if (path.startsWith("/")) {
-            LOG.trace("Using ServletContext to load resource #0", path);
-            URL resource = getResource(path);
+            LOG.trace("Using ServletContext to load resource {}", path);
+            ApplicationResource resource = getResource(path);
             if (resource != null) {
                 resources.add(resource);
             }
         }
-        resources.addAll(findResources(path));
+
+        try {
+            resources.addAll(findResources(path));
+        } catch (IOException e) {
+            LOG.error(new MessageFormatMessage("Cannot find resources for [{}]", path), e);
+        }
 
         return resources;
     }
 
-    protected Set<URL> findResources(String path) throws IOException {
-        Set<URL> resources = new HashSet<>();
+    protected Set<ApplicationResource> findResources(String path) throws IOException {
+        Set<ApplicationResource> resources = new HashSet<>();
 
-        LOG.trace("Using ResourceFinder to find matches for #0", path);
+        LOG.trace("Using ResourceFinder to find matches for {}", path);
 
         Pattern pattern = WildcardUtil.compileWildcardPattern(path);
         Map<String, URL> matches = finder.getResourcesMap("");
 
         for (String resource : matches.keySet()) {
             if (pattern.matcher(resource).matches()) {
-                resources.add(matches.get(resource));
+                URL url = matches.get(resource);
+                resources.add(new URLApplicationResource("", url));
             }
         }
 
-        LOG.trace("Found resources #0 for path #1", resources, path);
+        LOG.trace("Found resources {} for path {}", resources, path);
         return resources;
     }
 


[13/50] [abbrv] struts git commit: Ports solution from 2.3.x branch

Posted by lu...@apache.org.
Ports solution from 2.3.x branch


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

Branch: refs/heads/master
Commit: bdf4f0b534fa3f6c620be6e4c500b1bad3579baf
Parents: adb8a13
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 08:51:03 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 2016 +0100

----------------------------------------------------------------------
 .../tiles/StrutsTilesContainerFactory.java      |  37 ++++---
 .../struts2/tiles/StrutsTilesInitializer.java   |   3 +-
 ...sWildcardServletTilesApplicationContext.java | 106 +++++++++++++++++++
 3 files changed, 129 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/bdf4f0b5/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..785082b 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
@@ -181,7 +191,7 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
         DefinitionPatternMatcherFactory wildcardFactory = new WildcardDefinitionPatternMatcherFactory();
         DefinitionPatternMatcherFactory regexpFactory = new RegexpDefinitionPatternMatcherFactory();
 
-        PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<>();
+        PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<T>();
         resolver.registerDefinitionPatternMatcherFactory(PATTERN_WILDCARD, wildcardFactory);
         resolver.registerDefinitionPatternMatcherFactory(PATTERN_REGEXP, regexpFactory);
 
@@ -189,19 +199,9 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
     }
 
     @Override
-    protected List<URL> getSourceURLs(TilesApplicationContext applicationContext,
-                                      TilesRequestContextFactory contextFactory) {
+    protected List<URL> getSourceURLs(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory) {
         try {
-            Set<URL> finalSet = new HashSet<>();
-            Set<URL> webINFSet = applicationContext.getResources("/WEB-INF/**/tiles*.xml");
-            Set<URL> metaINFSet = applicationContext.getResources("classpath*:META-INF/**/tiles*.xml");
-
-            if (webINFSet != null) {
-                finalSet.addAll(webINFSet);
-            }
-            if (metaINFSet != null) {
-                finalSet.addAll(metaINFSet);
-            }
+            Set<URL> 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<String, String> params) {
+        if (params.containsKey(DefinitionsFactory.DEFINITIONS_CONFIG)) {
+            return params.get(DefinitionsFactory.DEFINITIONS_CONFIG);
+        }
+        return TILES_DEFAULT_PATTERN;
+    }
+
     protected ELAttributeEvaluator createELEvaluator(TilesApplicationContext applicationContext) {
 
         ELAttributeEvaluator evaluator = new ELAttributeEvaluator();

http://git-wip-us.apache.org/repos/asf/struts/blob/bdf4f0b5/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 b2e2700..0ff33c7 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 org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 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

http://git-wip-us.apache.org/repos/asf/struts/blob/bdf4f0b5/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 0000000..2328f06
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
@@ -0,0 +1,106 @@
+/*
+ * 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;
+import com.opensymphony.xwork2.util.WildcardUtil;
+import com.opensymphony.xwork2.util.finder.ResourceFinder;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+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.Enumeration;
+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 = LogManager.getLogger(StrutsWildcardServletTilesApplicationContext.class);
+
+    private ResourceFinder finder;
+
+    public StrutsWildcardServletTilesApplicationContext(ServletContext context) {
+        super(context);
+
+        Set<URL> 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);
+            }
+        }
+
+        try {
+            Enumeration<URL> 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()]));
+    }
+
+    public Set<URL> getResources(String path) throws IOException {
+        Set<URL> 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<URL> findResources(String path) throws IOException {
+        Set<URL> resources = new HashSet<>();
+
+        LOG.trace("Using ResourceFinder to find matches for #0", path);
+
+        Pattern pattern = WildcardUtil.compileWildcardPattern(path);
+        Map<String, URL> 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;
+    }
+
+}


[23/50] [abbrv] struts git commit: Ports solution to resolve problem with EL functions

Posted by lu...@apache.org.
Ports solution to resolve problem with EL functions


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

Branch: refs/heads/master
Commit: 8d83dc2f964a7af332df16b63a1380db5a26ced0
Parents: 4e3f950
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 08:51:34 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:42 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/8d83dc2f/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 ddc7669..3323302 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
@@ -350,6 +350,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);


[24/50] [abbrv] struts git commit: Uses new way to access TileContainer

Posted by lu...@apache.org.
Uses new way to access TileContainer


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

Branch: refs/heads/master
Commit: 07488866b665a30ba66602a48071d03076a81994
Parents: 9249aac
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 10:14:11 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:42 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/views/tiles/TilesResult.java    | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/07488866/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 72d7916..a402869 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
@@ -30,7 +30,11 @@ import org.apache.struts2.result.ServletDispatcherResult;
 import org.apache.tiles.TilesContainer;
 
 import com.opensymphony.xwork2.ActionInvocation;
-import org.apache.tiles.servlet.context.ServletUtil;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.servlet.ServletRequest;
+import org.apache.tiles.request.servlet.ServletUtil;
 
 /**
  * <!-- START SNIPPET: description -->
@@ -99,11 +103,14 @@ public class TilesResult extends ServletDispatcherResult {
 
         ServletContext servletContext = ServletActionContext.getServletContext();
 
-        TilesContainer container = ServletUtil.getContainer(servletContext);
+        ApplicationContext applicationContext = ServletUtil.getApplicationContext(servletContext);
+        TilesContainer container = TilesAccess.getContainer(applicationContext);
 
-        HttpServletRequest request = ServletActionContext.getRequest();
-        HttpServletResponse response = ServletActionContext.getResponse();
+        HttpServletRequest httpRequest = ServletActionContext.getRequest();
+        HttpServletResponse httpResponse = ServletActionContext.getResponse();
 
-        container.render(location, request, response);
+        Request request = new ServletRequest(applicationContext, httpRequest, httpResponse);
+
+        container.render(location, request);
     }
 }


[14/50] [abbrv] struts git commit: Removes module

Posted by lu...@apache.org.
Removes module


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

Branch: refs/heads/master
Commit: adb8a1365cb74796363d649f10623205e9a6f54f
Parents: 9f665f7
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 08:19:52 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 2016 +0100

----------------------------------------------------------------------
 plugins/pom.xml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/adb8a136/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 2f1fe76..ba44181 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -59,7 +59,6 @@
         <module>spring</module>
         <module>testng</module>
         <module>tiles</module>
-        <module>tiles3</module>
     </modules>
 
     <dependencies>


[16/50] [abbrv] struts git commit: Prevents eval expressions at all

Posted by lu...@apache.org.
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/61f9b07a
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/61f9b07a
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/61f9b07a

Branch: refs/heads/master
Commit: 61f9b07a788292b03ccdfae727f19bf2d7d47ad9
Parents: 46f3cf2
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Jan 10 12:00:10 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 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/61f9b07a/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<String, Object> context, Object root, Object value) throws OgnlException {
-        setValue(name, context, root, value, true);
-    }
-
-    protected void setValue(String name, final Map<String, Object> context, final Object root, final Object value, final boolean evalName) throws OgnlException {
+    public void setValue(final String name, final Map<String, Object> context, final Object root, final Object value) throws OgnlException {
         compileAndExecute(name, context, new OgnlTask<Void>() {
             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/61f9b07a/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<String, Object> 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<String, Object> context, boolean evalExpression) throws OgnlException {
+    private void trySetValue(String expr, Object value, boolean throwExceptionOnFailure, Map<String, Object> 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<String, Object> context) {


[06/50] [abbrv] struts git commit: WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input

Posted by lu...@apache.org.
WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input


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

Branch: refs/heads/master
Commit: b84fd6fe0ca1d159da831df8444ee18bb9727e1b
Parents: 6fd37d8
Author: Aleksandr Mashchenko <am...@apache.org>
Authored: Wed Jan 6 19:24:56 2016 +0200
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../multipart/JakartaStreamMultiPartRequest.java          | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b84fd6fe/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
index 6727f3e..f4c4665 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
@@ -384,6 +384,12 @@ public class JakartaStreamMultiPartRequest implements MultiPartRequest {
      * @param location location
      */
     private void processFileItemStreamAsFileField(FileItemStream itemStream, String location) {
+        // Skip file uploads that don't have a file name - meaning that no file was selected.
+        if (itemStream.getName() == null || itemStream.getName().trim().length() < 1) {
+            LOG.debug("No file has been uploaded for the field: {}", itemStream.getFieldName());
+            return;
+        }
+
         File file = null;
         try {
             // Create the temporary upload file.
@@ -424,6 +430,10 @@ public class JakartaStreamMultiPartRequest implements MultiPartRequest {
             suffix = name.substring(name.lastIndexOf('.'));
         }
 
+        if (prefix.length() < 3) {
+            prefix = UUID.randomUUID().toString();
+        }
+
         File file = File.createTempFile(prefix + "_", suffix, new File(location));
         LOG.debug("Creating temporary file '{}' (originally '{}').", file.getName(), fileName);
         return file;


[46/50] [abbrv] struts git commit: Merge remote-tracking branch 'upstream/master' into http-parameters

Posted by lu...@apache.org.
Merge remote-tracking branch 'upstream/master' into http-parameters

Conflicts:
	core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
	core/src/test/java/com/opensymphony/xwork2/interceptor/I18nInterceptorTest.java
	core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
	core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
	core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java
	core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java


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

Branch: refs/heads/master
Commit: bb21dbe4929cf88a4c2565fdbd359d0e0b067e1f
Parents: abd8c6b fc2179c
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Sat Mar 12 16:03:42 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Sat Mar 12 16:03:42 2016 +0100

----------------------------------------------------------------------
 .gitignore                                      |   1 -
 apps/portlet/pom.xml                            |   2 +-
 .../struts2/portlet/test/BasePortletTest.java   |   6 +-
 .../portlet/test/Struts2PortletTest.java        |   2 +
 .../org/demo/rest/example/IndexController.java  |  16 ++
 apps/rest-showcase/src/main/webapp/index.jsp    |   2 -
 .../showcase/tiles/TilesAnnotationsAction.java  |  40 +++
 apps/showcase/src/main/webapp/WEB-INF/tiles.xml |  10 +-
 .../src/main/webapp/WEB-INF/tiles/body.jsp      |   3 +
 .../webapp/WEB-INF/tiles/layout-annotations.jsp |  14 ++
 .../WEB-INF/validation/ajaxFormSubmit.jsp       |   7 +-
 assembly/pom.xml                                |   5 -
 assembly/src/main/assembly/all.xml              |   4 -
 assembly/src/main/assembly/docs.xml             |   4 -
 bom/pom.xml                                     |   5 -
 .../xwork2/DefaultActionInvocation.java         |   7 +-
 .../com/opensymphony/xwork2/XWorkConstants.java |   1 +
 ...ervletContextAwareConfigurationProvider.java |  32 +++
 .../xwork2/config/entities/ActionConfig.java    |   1 +
 .../xwork2/config/entities/AllowedMethods.java  |  30 +++
 .../xwork2/config/entities/PackageConfig.java   |   2 +-
 .../xwork2/config/impl/ActionConfigMatcher.java |   1 +
 .../providers/XmlConfigurationProvider.java     |  32 +--
 .../interceptor/DefaultWorkflowInterceptor.java |   4 +-
 .../xwork2/interceptor/I18nInterceptor.java     |   5 +
 .../interceptor/ParametersInterceptor.java      |  29 +--
 .../com/opensymphony/xwork2/ognl/OgnlUtil.java  |  15 +-
 .../xwork2/ognl/OgnlValueStack.java             |   1 +
 .../xwork2/ognl/SecurityMemberAccess.java       |  16 +-
 .../xwork2/util/LocalizedTextUtil.java          |  31 ++-
 .../validator/DelegatingValidatorContext.java   |   7 +-
 .../org/apache/struts2/StrutsConstants.java     |   1 +
 .../apache/struts2/components/Component.java    |   6 +-
 .../org/apache/struts2/components/UIBean.java   |   4 +-
 .../template/VelocityTemplateEngine.java        |   2 +-
 .../config/DefaultBeanSelectionProvider.java    |   1 +
 .../apache/struts2/dispatcher/Dispatcher.java   |   3 +
 .../struts2/dispatcher/PrepareOperations.java   |   2 +
 .../multipart/JakartaMultiPartRequest.java      |  12 +-
 .../struts2/interceptor/CookieInterceptor.java  |  12 +-
 .../interceptor/MessageStoreInterceptor.java    |  58 +----
 .../MessageStorePreResultListener.java          |  95 +++++++
 .../org/apache/struts2/util/ComponentUtils.java |   9 +-
 .../struts2/views/jsp/ui/AbstractUITag.java     |   2 +-
 core/src/main/resources/struts-default.xml      |  20 +-
 .../resources/template/simple/checkboxlist.ftl  |   7 +-
 .../main/resources/template/simple/radiomap.ftl |   5 +-
 .../xwork2/DefaultActionInvocationTest.java     |   3 +
 .../config/entities/ActionConfigTest.java       |   4 +-
 .../config/entities/AllowedMethodsTest.java     |  15 ++
 .../config/impl/ActionConfigMatcherTest.java    |  16 +-
 ...ConfigurationProviderAllowedMethodsTest.java |  38 ++-
 .../XmlConfigurationProviderResultsTest.java    |  54 ++++
 .../xwork2/config/providers/XmlHelperTest.java  | 234 ++++++-----------
 .../xwork2/interceptor/I18nInterceptorTest.java |  16 +-
 .../ParameterRemoverInterceptorTest.java        |  23 +-
 .../PrefixMethodInvocationUtilTest.java         | 135 ++++------
 .../interceptor/PrepareInterceptorTest.java     |  83 +++---
 .../xwork2/ognl/SecurityMemberAccessTest.java   |  20 +-
 .../validator/VisitorFieldValidatorTest.java    |   2 +-
 .../org/apache/struts2/RequestUtilsTest.java    |  66 +++--
 .../interceptor/CookieInterceptorTest.java      | 124 ++++-----
 .../interceptor/I18nInterceptorTest.java        |  16 +-
 .../MessageStoreInterceptorTest.java            | 183 +++-----------
 .../MessageStorePreResultListenerTest.java      | 252 +++++++++++++++++++
 .../ServletConfigInterceptorTest.java           |  70 +++---
 .../struts2/result/VelocityResultTest.java      |   4 +-
 .../apache/struts2/util/ComponentUtilsTest.java |  44 ++++
 .../apache/struts2/views/jsp/ActionTagTest.java |   3 +-
 .../struts2/views/jsp/IncludeTagTest.java       |  50 ++--
 .../struts2/views/util/ResourceUtilTest.java    |  24 +-
 .../com/opensymphony/xwork2/TestBean.properties |   2 +-
 .../providers/xwork-test-allowed-methods.xml    |   6 +-
 .../providers/xwork-test-result-names.xml       |  48 ++++
 plugins/convention/pom.xml                      |   5 -
 .../convention/DefaultResultMapBuilder.java     |  20 +-
 .../PackageBasedActionConfigBuilder.java        |   6 +-
 .../convention/annotation/AllowedMethods.java   |   2 +-
 .../struts2/convention/annotation/Result.java   |   2 +-
 .../ConventionUnknownHandlerTest.java           |   6 +-
 .../convention/DefaultResultMapBuilderTest.java |  58 +++++
 .../PackageBasedActionConfigBuilderTest.java    |   4 +-
 .../actions/allowedmethods/package-info.java    |   2 +-
 .../result/ActionLevelResultsNamesAction.java   |  47 ++++
 plugins/javatemplates/pom.xml                   |   6 +-
 .../views/java/simple/TextFieldHandler.java     |   4 +-
 .../struts2/views/java/simple/AbstractTest.java |  36 +--
 .../rest/DefaultContentTypeHandlerManager.java  |  69 ++++-
 .../apache/struts2/rest/RestActionMapper.java   |   7 +-
 .../DefaultContentTypeHandlerManagerTest.java   |  42 ++++
 .../struts2/rest/RestActionMapperTest.java      |  41 ++-
 .../sitemesh/VelocityDecoratorServlet.java      |  53 ++--
 .../tiles/StrutsTilesAnnotationProcessor.java   | 177 +++++++++++++
 .../tiles/annotation/TilesAddAttribute.java     |  30 +++
 .../tiles/annotation/TilesAddListAttribute.java |  28 +++
 .../tiles/annotation/TilesDefinition.java       |  66 +++++
 .../tiles/annotation/TilesDefinitions.java      |  36 +++
 .../tiles/annotation/TilesPutAttribute.java     |  32 +++
 .../tiles/annotation/TilesPutListAttribute.java |  32 +++
 .../apache/struts2/views/tiles/TilesResult.java |  69 ++++-
 .../StrutsTilesAnnotationProcessorTest.java     | 147 +++++++++++
 .../TilesTestActionMultipleAnnotations.java     |  12 +
 .../tiles/TilesTestActionSingleAnnotation.java  |  49 ++++
 ...TilesTestActionSingleAnnotationAllEmpty.java |  28 +++
 pom.xml                                         |  23 +-
 .../VisitorValidatorTestAction.properties       |   1 +
 106 files changed, 2308 insertions(+), 941 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
----------------------------------------------------------------------
diff --cc core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
index 3d1e6f2,cf4995e..acc0d7b
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
@@@ -20,9 -20,8 +20,10 @@@ import com.opensymphony.xwork2.ActionIn
  import com.opensymphony.xwork2.util.LocalizedTextUtil;
  import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
 +import org.apache.struts2.dispatcher.Parameter;
 +import org.apache.struts2.dispatcher.HttpParameters;
  
+ import java.util.Arrays;
  import java.util.Locale;
  import java.util.Map;
  

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
----------------------------------------------------------------------
diff --cc core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
index 67288ff,f90e8c3..80aa363
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
@@@ -168,10 -169,11 +168,10 @@@ public class ParametersInterceptor exte
              acceptableParameters = new TreeMap<>();
          }
  
 -        for (Map.Entry<String, Object> entry : params.entrySet()) {
 -            String name = entry.getKey();
 -            Object value = entry.getValue();
 +        for (String name : params.getNames()) {
 +            Parameter parameter = params.get(name);
-             if (isAcceptableParameter(name, action) && isAcceptableValue(parameter.getValue())) {
+             if (isAcceptableParameter(name, action)) {
 -                acceptableParameters.put(name, entry.getValue());
 +                acceptableParameters.put(name, parameter);
              }
          }
  

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
index 341615d,4b7220e..f3e8cb5
--- a/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
@@@ -27,9 -27,7 +27,8 @@@ import com.opensymphony.xwork2.intercep
  import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
  import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
 +import org.apache.struts2.dispatcher.HttpParameters;
  
- import org.apache.struts2.ServletActionContext;
  import org.apache.struts2.result.ServletRedirectResult;
  
  import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/test/java/com/opensymphony/xwork2/interceptor/I18nInterceptorTest.java
----------------------------------------------------------------------
diff --cc core/src/test/java/com/opensymphony/xwork2/interceptor/I18nInterceptorTest.java
index 2a4d98c,17c27aa..f4dfa93
--- a/core/src/test/java/com/opensymphony/xwork2/interceptor/I18nInterceptorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/interceptor/I18nInterceptorTest.java
@@@ -83,12 -82,12 +83,12 @@@ public class I18nInterceptorTest extend
      }
  
      public void testCountryOnlyLocale() throws Exception {
-         prepare(I18nInterceptor.DEFAULT_PARAMETER, "DK");
 -        params.put(I18nInterceptor.DEFAULT_PARAMETER, "NL");
++        prepare(I18nInterceptor.DEFAULT_PARAMETER, "NL");
          interceptor.intercept(mai);
  
 -        assertNull(params.get(I18nInterceptor.DEFAULT_PARAMETER)); // should have been removed
 +        assertFalse(mai.getInvocationContext().getParameters().get(I18nInterceptor.DEFAULT_PARAMETER).isDefined()); // should have been removed
  
-         Locale denmark = new Locale("DK");
+         Locale denmark = new Locale("NL");
          assertNotNull(session.get(I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE)); // should be stored here
          assertEquals(denmark, session.get(I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE)); // should create a locale object
      }
@@@ -105,12 -104,12 +105,12 @@@
      }
  
      public void testWithVariant() throws Exception {
-         prepare(I18nInterceptor.DEFAULT_PARAMETER, "fr_CA_xx");
 -        params.put(I18nInterceptor.DEFAULT_PARAMETER, "ja_JP_JP");
++        prepare(I18nInterceptor.DEFAULT_PARAMETER, "ja_JP_JP");
          interceptor.intercept(mai);
  
 -        assertNull(params.get(I18nInterceptor.DEFAULT_PARAMETER)); // should have been removed
 +        assertFalse(mai.getInvocationContext().getParameters().get(I18nInterceptor.DEFAULT_PARAMETER).isDefined()); // should have been removed
  
-         Locale variant = new Locale("fr", "CA", "xx");
+         Locale variant = new Locale("ja", "JP", "JP");
          Locale locale = (Locale) session.get(I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE);
          assertNotNull(locale); // should be stored here
          assertEquals(variant, locale);
@@@ -118,13 -117,13 +118,13 @@@
      }
  
      public void testWithVariantRequestOnly() throws Exception {
-         prepare(I18nInterceptor.DEFAULT_REQUESTONLY_PARAMETER, "fr_CA_xx");
 -        params.put(I18nInterceptor.DEFAULT_REQUESTONLY_PARAMETER, "ja_JP_JP");
++        prepare(I18nInterceptor.DEFAULT_REQUESTONLY_PARAMETER, "ja_JP_JP");
          interceptor.intercept(mai);
  
 -        assertNull(params.get(I18nInterceptor.DEFAULT_PARAMETER)); // should have been removed
 +        assertFalse(mai.getInvocationContext().getParameters().get(I18nInterceptor.DEFAULT_PARAMETER).isDefined()); // should have been removed
          assertNull(session.get(I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE));
  
-         Locale variant = new Locale("fr", "CA", "xx");
+         Locale variant = new Locale("ja", "JP", "JP");
          Locale locale = mai.getInvocationContext().getLocale();
          assertNotNull(locale); // should be stored here
          assertEquals(variant, locale);

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
----------------------------------------------------------------------
diff --cc core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
index eeaec7c,720ef93..5412fb8
--- a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
@@@ -4,8 -4,7 +4,9 @@@ import com.opensymphony.xwork2.ActionCo
  import com.opensymphony.xwork2.ActionInvocation;
  import com.opensymphony.xwork2.ActionSupport;
  import junit.framework.TestCase;
 +import org.apache.struts2.dispatcher.HttpParameters;
 +import org.easymock.MockControl;
+ import static org.easymock.EasyMock.*;
  
  import java.util.LinkedHashMap;
  import java.util.Map;
@@@ -34,30 -31,31 +33,30 @@@ public class ParameterRemoverIntercepto
  	}
  	
  	public void testInterception1() throws Exception {
 -		contextMap.put(ActionContext.PARAMETERS, new LinkedHashMap<String, Object>() {
 -			private static final long serialVersionUID = 0L;
 +		contextMap.put(ActionContext.PARAMETERS, HttpParameters.create(new LinkedHashMap<String, Object>() {
  			{
 -				put("param1", new String[] { "paramValue1" });
 -				put("param2", new String[] { "paramValue2" });
 -				put("param3", new String[] { "paramValue3" });
 -				put("param", new String[] { "paramValue" });
 +				put("param1", new String[]{"paramValue1"});
 +				put("param2", new String[]{"paramValue2"});
 +				put("param3", new String[]{"paramValue3"});
 +				put("param", new String[]{"paramValue"});
  			}
 -		});
 +		}).build());
  		
- 		actionInvocationControl.replay();
+ 		replay(actionInvocation);
  		
  		ParameterRemoverInterceptor interceptor = new ParameterRemoverInterceptor();
  		interceptor.setParamNames("param1,param2");
  		interceptor.setParamValues("paramValue1,paramValue2");
  		interceptor.intercept(actionInvocation);
  		
 -		Map params = (Map) contextMap.get(ActionContext.PARAMETERS);
 -		assertEquals(params.size(), 2);
 -		assertTrue(params.containsKey("param3"));
 -		assertTrue(params.containsKey("param"));
 -		assertEquals(((String[])params.get("param3"))[0], "paramValue3");
 -		assertEquals(((String[])params.get("param"))[0], "paramValue");
 +		HttpParameters params = (HttpParameters) contextMap.get(ActionContext.PARAMETERS);
 +		assertEquals(params.getNames().size(), 2);
 +		assertTrue(params.contains("param3"));
 +		assertTrue(params.contains("param"));
 +		assertEquals(params.get("param3").getValue(), "paramValue3");
 +		assertEquals(params.get("param").getValue(), "paramValue");
  		
- 		actionInvocationControl.verify();
+ 		verify(actionInvocation);
  	}
  	
  	
@@@ -67,19 -66,19 +66,19 @@@
  				put("param1", new String[] { "paramValue2" });
  				put("param2", new String[] { "paramValue1" });
  			}
 -		});
 +		}).build());
  		
- 		actionInvocationControl.replay();
+ 		replay(actionInvocation);
  		
  		ParameterRemoverInterceptor interceptor = new ParameterRemoverInterceptor();
  		interceptor.setParamNames("param1,param2");
  		interceptor.setParamValues("paramValue1,paramValue2");
  		interceptor.intercept(actionInvocation);
  		
 -		Map params = (Map) contextMap.get(ActionContext.PARAMETERS);
 -		assertEquals(params.size(), 0);
 +		HttpParameters params = (HttpParameters) contextMap.get(ActionContext.PARAMETERS);
 +		assertEquals(params.getNames().size(), 0);
  		
- 		actionInvocationControl.verify();
+ 		verify(actionInvocation);
  	}
  	
  	
@@@ -89,23 -89,23 +88,23 @@@
  				put("param1", new String[] { "paramValueOne" });
  				put("param2", new String[] { "paramValueTwo" });
  			}
 -		});
 +		}).build());
  		
- 		actionInvocationControl.replay();
+ 		replay(actionInvocation);
  		
  		ParameterRemoverInterceptor interceptor = new ParameterRemoverInterceptor();
  		interceptor.setParamNames("param1,param2");
  		interceptor.setParamValues("paramValue1,paramValue2");
  		interceptor.intercept(actionInvocation);
  		
 -		Map params = (Map) contextMap.get(ActionContext.PARAMETERS);
 -		assertEquals(params.size(), 2);
 -		assertTrue(params.containsKey("param1"));
 -		assertTrue(params.containsKey("param2"));
 -		assertEquals(((String[])params.get("param1"))[0], "paramValueOne");
 -		assertEquals(((String[])params.get("param2"))[0], "paramValueTwo");
 +		HttpParameters params = (HttpParameters) contextMap.get(ActionContext.PARAMETERS);
 +		assertEquals(params.getNames().size(), 2);
 +		assertTrue(params.contains("param1"));
 +		assertTrue(params.contains("param2"));
 +		assertEquals(params.get("param1").getValue(), "paramValueOne");
 +		assertEquals(params.get("param2").getValue(), "paramValueTwo");
  		
- 		actionInvocationControl.verify();
+ 		verify(actionInvocation);
  	}
  	
  	class SampleAction extends ActionSupport {

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
----------------------------------------------------------------------
diff --cc core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
index a3784d3,9fc8396..1e73955
--- a/core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
+++ b/core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
@@@ -27,9 -27,10 +27,11 @@@ import java.util.LinkedHashMap
  import java.util.List;
  import java.util.Map;
  
+ import com.opensymphony.xwork2.ActionProxy;
+ import com.opensymphony.xwork2.interceptor.PreResultListener;
  import org.apache.struts2.ServletActionContext;
  import org.apache.struts2.StrutsInternalTestCase;
 +import org.apache.struts2.dispatcher.HttpParameters;
  import org.apache.struts2.result.ServletActionRedirectResult;
  import org.easymock.EasyMock;
  
@@@ -65,81 -69,24 +70,22 @@@ public class MessageStoreInterceptorTes
          interceptor.setAllowRequestParameterSwitch(true);
          interceptor.setOperationMode(MessageStoreInterceptor.STORE_MODE);
  
- 
-         Map sessionMap = new LinkedHashMap();
 -        Map paramMap = new LinkedHashMap();
--
          ActionSupport action = new ActionSupport();
          action.addActionError("some action error 1");
-         action.addActionError("some action error 2");
          action.addActionMessage("some action message 1");
-         action.addActionMessage("some action message 2");
-         action.addFieldError("field1", "some field error 1");
          action.addFieldError("field2", "some field error 2");
  
          ActionContext actionContext = new ActionContext(new HashMap());
 -        actionContext.put(ActionContext.PARAMETERS, paramMap);
 +        actionContext.setParameters(HttpParameters.createEmpty().build());
-         actionContext.setSession(sessionMap);
- 
-         // Mock (ActionInvocation)
-         ActionInvocation mockActionInvocation = EasyMock.createControl().createMock(ActionInvocation.class);
-         mockActionInvocation.getInvocationContext();
-         EasyMock.expectLastCall().andReturn(actionContext);
-         EasyMock.expectLastCall().anyTimes();
- 
-         mockActionInvocation.invoke();
-         EasyMock.expectLastCall().andReturn(Action.SUCCESS);
- 
-         mockActionInvocation.getAction();
-         EasyMock.expectLastCall().andReturn(action);
-         
-         mockActionInvocation.getResult();
-         EasyMock.expectLastCall().andReturn(new ServletActionRedirectResult());
- 
-         EasyMock.replay(mockActionInvocation);
  
-         interceptor.init();
-         interceptor.intercept(mockActionInvocation);
-         interceptor.destroy();
- 
-         assertEquals(sessionMap.size(), 3);
-         assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionErrorsSessionKey));
-         assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionMessagesSessionKey));
-         assertTrue(sessionMap.containsKey(MessageStoreInterceptor.fieldErrorsSessionKey));
- 
-         List actionErrors = (List) sessionMap.get(MessageStoreInterceptor.actionErrorsSessionKey);
-         List actionMessages = (List) sessionMap.get(MessageStoreInterceptor.actionMessagesSessionKey);
-         Map fieldErrors = (Map) sessionMap.get(MessageStoreInterceptor.fieldErrorsSessionKey);
- 
-         assertEquals(actionErrors.size(), 2);
-         assertEquals(actionMessages.size(), 2);
-         assertEquals(fieldErrors.size(), 2);
- 
-         assertTrue(actionErrors.contains("some action error 1"));
-         assertTrue(actionErrors.contains("some action error 2"));
-         assertTrue(actionMessages.contains("some action message 1"));
-         assertTrue(actionMessages.contains("some action message 2"));
-         assertTrue(fieldErrors.containsKey("field1"));
-         assertTrue(fieldErrors.containsKey("field2"));
-         assertEquals(((List)fieldErrors.get("field1")).size(), 1);
-         assertEquals(((List)fieldErrors.get("field2")).size(), 1);
-         assertEquals(((List)fieldErrors.get("field1")).get(0), "some field error 1");
-         assertEquals(((List)fieldErrors.get("field2")).get(0), "some field error 2");
- 
-         EasyMock.verify(mockActionInvocation);
-     }
- 
-     public void testIgnoreMessageWithoutSession() throws Exception {
-         MessageStoreInterceptor interceptor = new MessageStoreInterceptor();
-         interceptor.setAllowRequestParameterSwitch(true);
-         interceptor.setOperationMode(MessageStoreInterceptor.STORE_MODE);
+         HttpSession mockedSession = EasyMock.createControl().createMock(HttpSession.class);
+         HttpServletRequest mockedRequest = EasyMock.createControl().createMock(HttpServletRequest.class);
+         mockedRequest.getSession(false);
+         EasyMock.expectLastCall().andReturn(mockedSession);
+         EasyMock.expectLastCall().once();
+         ServletActionContext.setRequest(mockedRequest);
  
-         ActionSupport action = new ActionSupport();
-         action.addActionError("some action error 1");
-         action.addActionMessage("some action message 1");
-         action.addFieldError("field2", "some field error 2");
- 
-         ActionContext actionContext = new ActionContext(new HashMap());
-         actionContext.setParameters(HttpParameters.createEmpty().build());
+         EasyMock.replay(mockedRequest);
  
          // Mock (ActionInvocation)
          ActionInvocation mockActionInvocation = EasyMock.createControl().createMock(ActionInvocation.class);
@@@ -198,9 -143,17 +141,17 @@@
          sessionMap.put(MessageStoreInterceptor.actionMessagesSessionKey, actionMessages);
          sessionMap.put(MessageStoreInterceptor.fieldErrorsSessionKey, fieldErrors);
  
+         HttpSession mockedSession = EasyMock.createControl().createMock(HttpSession.class);
+         HttpServletRequest mockedRequest = EasyMock.createControl().createMock(HttpServletRequest.class);
+         mockedRequest.getSession(false);
+         EasyMock.expectLastCall().andReturn(mockedSession);
+         EasyMock.expectLastCall().once();
+         ServletActionContext.setRequest(mockedRequest);
+ 
+         EasyMock.replay(mockedRequest);
  
          ActionContext actionContext = new ActionContext(new HashMap());
 -        actionContext.put(ActionContext.PARAMETERS, paramsMap);
 +        actionContext.setParameters(HttpParameters.createEmpty().build());
          actionContext.put(ActionContext.SESSION, sessionMap);
  
          mockActionInvocation.getInvocationContext();
@@@ -252,9 -206,18 +203,18 @@@
          action.addFieldError("field2", "some field error 2");
  
          ActionContext actionContext = new ActionContext(new HashMap());
 -        actionContext.put(ActionContext.PARAMETERS, paramMap);
 +        actionContext.setParameters(HttpParameters.createEmpty().build());
          actionContext.put(ActionContext.SESSION, sessionMap);
  
+         HttpSession mockedSession = EasyMock.createControl().createMock(HttpSession.class);
+         HttpServletRequest mockedRequest = EasyMock.createControl().createMock(HttpServletRequest.class);
+         mockedRequest.getSession(false);
+         EasyMock.expectLastCall().andReturn(mockedSession);
+         EasyMock.expectLastCall().once();
+         ServletActionContext.setRequest(mockedRequest);
+ 
+         EasyMock.replay(mockedRequest);
+ 
          // Mock (ActionInvocation)
          ActionInvocation mockActionInvocation = EasyMock.createControl().createMock(ActionInvocation.class);
          mockActionInvocation.getInvocationContext();

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java
----------------------------------------------------------------------
diff --cc core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java
index 982d7b1,a3b8a7b..244d5f3
--- a/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java
+++ b/core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java
@@@ -30,9 -30,10 +30,11 @@@ import javax.servlet.http.HttpServletRe
  
  import org.apache.struts2.StrutsInternalTestCase;
  import org.apache.struts2.StrutsStatics;
+ import org.apache.struts2.interceptor.servlet.ServletPrincipalProxy;
 +import org.apache.struts2.dispatcher.HttpParameters;
  import org.apache.struts2.util.ServletContextAware;
- import org.easymock.MockControl;
+ 
+ import static org.easymock.EasyMock.*;
  import org.springframework.mock.web.MockHttpServletRequest;
  import org.springframework.mock.web.MockHttpServletResponse;
  import org.springframework.mock.web.MockServletContext;
@@@ -89,15 -87,15 +88,15 @@@ public class ServletConfigInterceptorTe
  
          MockActionInvocation mai = createActionInvocation(mock);
  
 -        Map<String, Object> param = new HashMap<String, Object>();
 +        HttpParameters param = HttpParameters.createEmpty().build();
          mai.getInvocationContext().setParameters(param);
  
 -        mock.setParameters((Map)param);
 +        mock.setParameters(param);
-         control.setVoidCallable();
+         expectLastCall().times(1);
  
-         control.replay();
+         replay(mock);
          interceptor.intercept(mai);
-         control.verify();
+         verify(mock);
      }
  
      public void testSessionAware() throws Exception {
@@@ -125,13 -121,13 +122,13 @@@
  
          Map<String, Object> app = new HashMap<String, Object>();
          mai.getInvocationContext().setApplication(app);
 -        
 +
          mock.setApplication(app);
-         control.setVoidCallable();
+         expectLastCall().times(1);
  
-         control.replay();
+         replay(mock);
          interceptor.intercept(mai);
-         control.verify();
+         verify(mock);
      }
  
      public void testPrincipalAware() throws Exception {
@@@ -148,12 -142,12 +143,12 @@@
          MockServletContext ctx = new MockServletContext();
          mai.getInvocationContext().put(StrutsStatics.SERVLET_CONTEXT, ctx);
  
-         mock.setPrincipalProxy(null); // we can do this because of ALWAYS_MATCHER
-         control.setVoidCallable();
+         mock.setPrincipalProxy(anyObject(ServletPrincipalProxy.class)); // less strick match is needed for this unit test to be conducted using mocks
+         expectLastCall().times(1);
 -        
 +
-         control.replay();
+         replay(mock);
          interceptor.intercept(mai);
-         control.verify();
+         verify(mock);
      }
  
      public void testPrincipalProxy() throws Exception {
@@@ -186,13 -179,13 +180,13 @@@
  
          MockServletContext ctx = new MockServletContext();
          mai.getInvocationContext().put(StrutsStatics.SERVLET_CONTEXT, ctx);
 -        
 +
          mock.setServletContext((ServletContext) ctx);
-         control.setVoidCallable();
+         expectLastCall().times(1);
 -        
 +
-         control.replay();
+         replay(mock);
          interceptor.intercept(mai);
-         control.verify();
+         verify(mock);
      }
  
      private MockActionInvocation createActionInvocation(Object mock) {

http://git-wip-us.apache.org/repos/asf/struts/blob/bb21dbe4/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
----------------------------------------------------------------------
diff --cc core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
index 4d2f878,2b1cd82..024ded8
--- a/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
@@@ -180,8 -178,9 +180,9 @@@ public class ActionTagTest extends Abst
          TestActionTagResult result = (TestActionTagResult) component.getProxy().getInvocation().getResult();
  
          assertTrue(stack.getContext().containsKey(ServletActionContext.PAGE_CONTEXT));
 -        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT)instanceof PageContext);
 +        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT) instanceof PageContext);
-         assertNull(result); // result is never executed, hence never set into invocation
+         assertNotNull(result);
+         assertFalse(result.isExecuted());
      }
  
       public void testExecuteButResetReturnSameInvocation() throws Exception {


[26/50] [abbrv] struts git commit: Migrates tiles-portlet to the same version

Posted by lu...@apache.org.
Migrates tiles-portlet to the same version


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

Branch: refs/heads/master
Commit: f6d0e15f6b1a3a6fd0f9c46c00671d0aadf00a81
Parents: 0748886
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 10:36:46 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:18 2016 +0100

----------------------------------------------------------------------
 plugins/portlet-tiles/pom.xml                   |  2 +-
 .../struts2/views/tiles/PortletTilesResult.java | 50 +++++++++++++++-----
 pom.xml                                         |  5 +-
 3 files changed, 41 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/f6d0e15f/plugins/portlet-tiles/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/portlet-tiles/pom.xml b/plugins/portlet-tiles/pom.xml
index 9e9a81f..8b710b2 100644
--- a/plugins/portlet-tiles/pom.xml
+++ b/plugins/portlet-tiles/pom.xml
@@ -44,7 +44,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.tiles</groupId>
-            <artifactId>tiles-portlet</artifactId>
+            <artifactId>tiles-request-portlet</artifactId>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>

http://git-wip-us.apache.org/repos/asf/struts/blob/f6d0e15f/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 83fcd4e..f12274b 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
@@ -22,22 +22,20 @@
 package org.apache.struts2.views.tiles;
 
 import com.opensymphony.xwork2.ActionInvocation;
-import freemarker.template.TemplateException;
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.result.ServletDispatcherResult;
 import org.apache.struts2.portlet.PortletConstants;
 import org.apache.struts2.portlet.context.PortletActionContext;
+import org.apache.struts2.result.ServletDispatcherResult;
 import org.apache.tiles.TilesContainer;
 import org.apache.tiles.TilesException;
 import org.apache.tiles.access.TilesAccess;
-import org.apache.tiles.portlet.context.PortletUtil;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.portlet.RenderPortletRequest;
 
 import javax.portlet.ActionResponse;
-import javax.portlet.PortletException;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
+import javax.portlet.PortletContext;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
 import java.util.Map;
 
 /**
@@ -68,12 +66,15 @@ public class PortletTilesResult extends ServletDispatcherResult {
     protected void executeRenderResult(String location) throws TilesException {
         setLocation(location);
 
-        TilesContainer container = PortletUtil.getContainer(PortletActionContext.getPortletContext());
+        PortletContext portletContext = PortletActionContext.getPortletContext();
+        RenderRequest request = PortletActionContext.getRenderRequest();
+        RenderResponse response = PortletActionContext.getRenderResponse();
 
-        HttpServletRequest request = ServletActionContext.getRequest();
-        HttpServletResponse response = ServletActionContext.getResponse();
+        TilesContainer container = getCurrentContainer(request, portletContext);
+        ApplicationContext applicationContext = container.getApplicationContext();
+        Request currentRequest = new RenderPortletRequest(applicationContext, portletContext, request, response);
 
-        container.render(location, request, response);
+        container.render(location, currentRequest);
     }
 
     protected void executeActionResult(String location, ActionInvocation invocation) {
@@ -87,4 +88,27 @@ public class PortletTilesResult extends ServletDispatcherResult {
         res.setRenderParameter(PortletConstants.MODE_PARAM, PortletActionContext.getRequest().getPortletMode().toString());
     }
 
+    protected TilesContainer getCurrentContainer(javax.portlet.PortletRequest request, PortletContext context) {
+
+        TilesContainer container = (TilesContainer) request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME);
+
+        if (container == null) {
+            container = getContainer(context);
+            request.setAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        }
+
+        return container;
+    }
+
+    protected TilesContainer getContainer(PortletContext context) {
+        return getContainer(context, TilesAccess.CONTAINER_ATTRIBUTE);
+    }
+
+    protected TilesContainer getContainer(PortletContext context, String key) {
+        if (key == null) {
+            key = TilesAccess.CONTAINER_ATTRIBUTE;
+        }
+        return (TilesContainer) context.getAttribute(key);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/f6d0e15f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3732ad1..1e0f708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,6 +89,7 @@
         <asm.version>3.3</asm.version>
         <asm5.version>5.0.2</asm5.version>
         <tiles.version>3.0.5</tiles.version>
+        <tiles-request.version>1.0.6</tiles-request.version>
         <log4j2.version>2.5</log4j2.version>
 
         <!-- SCM Site Configuration -->
@@ -620,8 +621,8 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.tiles</groupId>
-                <artifactId>tiles-portlet</artifactId>
-                <version>${tiles.version}</version>
+                <artifactId>tiles-request-portlet</artifactId>
+                <version>${tiles-request.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.tiles</groupId>


[18/50] [abbrv] struts git commit: WW-3731 Uses import to reduce noise in code

Posted by lu...@apache.org.
WW-3731 Uses import to reduce noise in code


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

Branch: refs/heads/master
Commit: bdb3b2ec24eeb60fc6bcdc7037918934d05ced55
Parents: a35a9a8
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Jan 12 08:11:08 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 2016 +0100

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/util/AnnotationUtils.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/bdb3b2ec/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java b/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
index 2144bc8..ef0ee53 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
@@ -15,6 +15,8 @@
  */
 package com.opensymphony.xwork2.util;
 
+import org.apache.commons.lang3.ArrayUtils;
+
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Field;
@@ -42,8 +44,6 @@ public class AnnotationUtils {
     private static final Pattern SETTER_PATTERN = Pattern.compile("set([A-Z][A-Za-z0-9]*)$");
     private static final Pattern GETTER_PATTERN = Pattern.compile("(get|is|has)([A-Z][A-Za-z0-9]*)$");
 
-
-
     /**
      * Adds all fields with the specified Annotation of class clazz and its superclasses to allFields
      *
@@ -122,9 +122,9 @@ public class AnnotationUtils {
         Collection<Method> toReturn = new HashSet<>();
 
         for (Method m : clazz.getMethods()) {
-            if (org.apache.commons.lang3.ArrayUtils.isNotEmpty(annotation) && isAnnotatedBy(m, annotation)) {
+            if (ArrayUtils.isNotEmpty(annotation) && isAnnotatedBy(m, annotation)) {
                 toReturn.add(m);
-            } else if (org.apache.commons.lang3.ArrayUtils.isEmpty(annotation) && org.apache.commons.lang3.ArrayUtils.isNotEmpty(m.getAnnotations())) {
+            } else if (ArrayUtils.isEmpty(annotation) && ArrayUtils.isNotEmpty(m.getAnnotations())) {
                 toReturn.add(m);
             }
 		}
@@ -140,7 +140,7 @@ public class AnnotationUtils {
 	 * @see AnnotatedElement
 	 */
 	public static boolean isAnnotatedBy(AnnotatedElement annotatedElement, Class<? extends Annotation>... annotation) {
-        if (org.apache.commons.lang3.ArrayUtils.isEmpty(annotation)) {
+        if (ArrayUtils.isEmpty(annotation)) {
             return false;
         }
 


[31/50] [abbrv] struts git commit: Overrides method to use defined base instead of fetching it again

Posted by lu...@apache.org.
Overrides method to use defined base instead of fetching it again


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

Branch: refs/heads/master
Commit: 828b237649368b5415508efc4bf5c0cc3436dc4f
Parents: 4c6e51b
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Wed Jan 13 12:05:58 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../struts2/tiles/StrutsWildcardServletApplicationContext.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/828b2376/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
index abd78a2..b8f10f9 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
@@ -95,6 +95,10 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC
         return resources;
     }
 
+    public ApplicationResource getResource(ApplicationResource base, Locale locale) {
+        return base;
+    }
+
     protected Set<ApplicationResource> findResources(String path) throws IOException {
         Set<ApplicationResource> resources = new HashSet<>();
 


[12/50] [abbrv] struts git commit: fix conflict

Posted by lu...@apache.org.
fix conflict


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

Branch: refs/heads/master
Commit: e9bd9453d592d50f5cde5d76f5e0544fa708e147
Parents: a446cda
Author: Victor Sosa <vi...@gmail.com>
Authored: Mon Jan 4 15:31:54 2016 -0400
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../struts2/views/jasperreports/JasperReportsResult.java       | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/e9bd9453/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index bee69d6..312604d 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -385,6 +385,12 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
         } catch (JRException e) {
             LOG.error("Error producing {} report for uri {}", format, systemId, e);
             throw new ServletException(e.getMessage(), e);
+        } finally {
+            try {
+                conn.close();
+            } catch (Exception e) {
+                LOG.warn("Could not close db connection properly", e);
+            }
         }
 
         response.setContentLength(output.size());


[47/50] [abbrv] struts git commit: Drops unused import

Posted by lu...@apache.org.
Drops unused import


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

Branch: refs/heads/master
Commit: 31826bc117e53eb65668866623f626cdb6f50760
Parents: bb21dbe
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Sat Mar 12 16:14:25 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Sat Mar 12 16:14:25 2016 +0100

----------------------------------------------------------------------
 .../xwork2/interceptor/ParameterRemoverInterceptorTest.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/31826bc1/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java b/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
index 5412fb8..854aed6 100644
--- a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
@@ -5,7 +5,7 @@ import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.ActionSupport;
 import junit.framework.TestCase;
 import org.apache.struts2.dispatcher.HttpParameters;
-import org.easymock.MockControl;
+
 import static org.easymock.EasyMock.*;
 
 import java.util.LinkedHashMap;


[07/50] [abbrv] struts git commit: added testcase for WW-4312 / #69

Posted by lu...@apache.org.
added testcase for WW-4312 / #69


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

Branch: refs/heads/master
Commit: 6fd37d86cceeae43a3481ed70ba2f500778249a4
Parents: dad437b
Author: cnenning <cn...@apache.org>
Authored: Tue Jan 5 13:47:15 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:00 2016 +0100

----------------------------------------------------------------------
 .../components/IteratorComponentTest.java       | 38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/6fd37d86/core/src/test/java/org/apache/struts2/components/IteratorComponentTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/components/IteratorComponentTest.java b/core/src/test/java/org/apache/struts2/components/IteratorComponentTest.java
index 1115493..c9a075a 100644
--- a/core/src/test/java/org/apache/struts2/components/IteratorComponentTest.java
+++ b/core/src/test/java/org/apache/struts2/components/IteratorComponentTest.java
@@ -76,6 +76,44 @@ public class IteratorComponentTest extends StrutsInternalTestCase {
         assertEquals("item2 item3 item4 ", out.getBuffer().toString());
     }
 
+    public void testIteratorWithNulls() throws Exception {
+        // given
+        final ValueStack stack = ActionContext.getContext().getValueStack();
+        stack.push(new FooAction() {
+            private List items  = Arrays.asList("1", "2", null, "4");
+
+            public List getItems() {
+                return items;
+            }
+        });
+
+        StringWriter out = new StringWriter();
+
+        IteratorComponent ic = new IteratorComponent(stack);
+        ic.setValue("items");
+        ic.setVar("val");
+        Property prop = new Property(stack);
+
+        ic.getComponentStack().push(prop);
+        ic.getComponentStack().push(prop);
+        ic.getComponentStack().push(prop);
+        ic.getComponentStack().push(prop);
+
+        String body = ", ";
+
+        // when
+        assertTrue(ic.start(out));
+
+        for (int i = 0; i < 4; i++) {
+            prop.start(out);
+            prop.end(out, body);
+            ic.end(out, null);
+        }
+
+        // then
+        assertEquals("1, 2, , 4, ", out.getBuffer().toString());
+    }
+
     static class FooAction {
 
         private List items;


[19/50] [abbrv] struts git commit: Adds new result 'JSONActionRedirectResult' to json-plugin. Contains tests and example in showcase app. The new result type is intended to be used along with existing JSONValidationInterceptor. It makes it possible to do

Posted by lu...@apache.org.
Adds new result 'JSONActionRedirectResult' to json-plugin. Contains tests and example in showcase app. The new result type is intended to be used along with existing JSONValidationInterceptor. It makes it possible to do form validation via ajax and handle form submitting, action execution and redirect evaluation all in one request inside JS context.


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

Branch: refs/heads/master
Commit: a35a9a82291bd86483cca0d5bd477ed54f511a30
Parents: 61f9b07
Author: cnenning <cn...@apache.org>
Authored: Mon Jan 11 14:36:32 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 2016 +0100

----------------------------------------------------------------------
 .../validation/AjaxFormSubmitAction.java        | 152 ++++++++++++++++
 .../validation/AjaxFormSubmitSuccessAction.java |   7 +
 .../src/main/resources/struts-validation.xml    |  13 ++
 .../ajaxErrorContainers/actionerror.ftl         |  46 +++++
 .../ajaxErrorContainers/controlfooter.ftl       |  39 ++++
 .../ajaxErrorContainers/controlheader-core.ftl  |  80 +++++++++
 .../ajaxErrorContainers/theme.properties        |  21 +++
 .../src/main/webapp/WEB-INF/decorators/main.jsp |   2 +
 .../WEB-INF/validation/ajaxFormSubmit.jsp       | 177 +++++++++++++++++++
 .../validation/ajaxFormSubmitSuccess.jsp        |  17 ++
 .../struts2/json/JSONActionRedirectResult.java  |  71 ++++++++
 .../struts2/json/JSONValidationInterceptor.java |   6 +-
 .../json/src/main/resources/struts-plugin.xml   |   1 +
 .../json/JSONActionRedirectResultTest.java      | 105 +++++++++++
 14 files changed, 735 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
new file mode 100644
index 0000000..b179370
--- /dev/null
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java
@@ -0,0 +1,152 @@
+package org.apache.struts2.showcase.validation;
+
+import java.sql.Date;
+
+import com.opensymphony.xwork2.validator.annotations.DateRangeFieldValidator;
+import com.opensymphony.xwork2.validator.annotations.EmailValidator;
+import com.opensymphony.xwork2.validator.annotations.FieldExpressionValidator;
+import com.opensymphony.xwork2.validator.annotations.IntRangeFieldValidator;
+import com.opensymphony.xwork2.validator.annotations.RegexFieldValidator;
+import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator;
+import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
+import com.opensymphony.xwork2.validator.annotations.StringLengthFieldValidator;
+import com.opensymphony.xwork2.validator.annotations.UrlValidator;
+
+/**
+ * <!-- START SNIPPET: ajaxFormSubmit -->
+ */
+/**
+ * Example Action that shows how forms can be validated and submitted via AJAX
+ * only. Form-submit-and-page-reload functionality of browsers is not used for
+ * this action.
+ * <p>Some things to note:
+ * <ul>
+ *   <li>Depends on <code>json-plugin</code>.</li>
+ *   <li>Requires <code>jsonValidationInterceptor</code> to be on stack.</li>
+ *   <li>Uses a special json redirect result type.</li>
+ *   <li>Uses http parameters <code>struts.enableJSONValidation=true</code> and <code>struts.validateOnly=false</code>.</li>
+ *   <li>Uses a customized theme to make sure html elements required as error containers are always present and easily selectable in JS.</li>
+ *   <li>Uses some custom JS code depending on jQuery to issue AJAX request and to render errors in html.</li>
+ *   <li>Shows visual feedback while waiting for AJAX response.</li>
+ * </ul>
+ * </p>
+ *
+ */
+public class AjaxFormSubmitAction extends AbstractValidationActionSupport {
+
+    private String requiredValidatorField = null;
+    private String requiredStringValidatorField = null;
+    private Integer integerValidatorField = null;
+    private Date dateValidatorField = null;
+    private String emailValidatorField = null;
+    private String urlValidatorField = null;
+    private String stringLengthValidatorField = null;
+    private String regexValidatorField = null;
+    private String fieldExpressionValidatorField = null;
+
+    @Override
+    public void validate() {
+        if (hasFieldErrors()) {
+            addActionError("Errors present!");
+        }
+    }
+
+    public Date getDateValidatorField() {
+        return dateValidatorField;
+    }
+
+    @DateRangeFieldValidator(
+        min="01/01/1990", 
+        max="01/01/2000", 
+        message="must be a min 01-01-1990 max 01-01-2000 if supplied")
+    public void setDateValidatorField(Date dateValidatorField) {
+        this.dateValidatorField = dateValidatorField;
+    }
+
+    public String getEmailValidatorField() {
+        return emailValidatorField;
+    }
+
+    @EmailValidator(message="must be a valid email if supplied")
+    public void setEmailValidatorField(String emailValidatorField) {
+        this.emailValidatorField = emailValidatorField;
+    }
+
+    public Integer getIntegerValidatorField() {
+        return integerValidatorField;
+    }
+
+    @IntRangeFieldValidator(min="1", max="10", message="must be integer min 1 max 10 if supplied")
+    public void setIntegerValidatorField(Integer integerValidatorField) {
+        this.integerValidatorField = integerValidatorField;
+    }
+
+    public String getRegexValidatorField() {
+        return regexValidatorField;
+    }
+
+    @RegexFieldValidator(
+        regex="[^<>]+", 
+        message="regexValidatorField must match a regexp (.*\\.txt) if specified")
+    public void setRegexValidatorField(String regexValidatorField) {
+        this.regexValidatorField = regexValidatorField;
+    }
+
+    public String getRequiredStringValidatorField() {
+        return requiredStringValidatorField;
+    }
+
+    @RequiredStringValidator(trim=true, message="required and must be string")
+    public void setRequiredStringValidatorField(String requiredStringValidatorField) {
+        this.requiredStringValidatorField = requiredStringValidatorField;
+    }
+
+    public String getRequiredValidatorField() {
+        return requiredValidatorField;
+    }
+
+    @RequiredFieldValidator(message="required")
+    public void setRequiredValidatorField(String requiredValidatorField) {
+        this.requiredValidatorField = requiredValidatorField;
+    }
+
+    public String getStringLengthValidatorField() {
+        return stringLengthValidatorField;
+    }
+
+    @StringLengthFieldValidator(
+        minLength="2", 
+        maxLength="4", 
+        trim=true, 
+        message="must be a String of a specific greater than 1 less than 5 if specified")
+    public void setStringLengthValidatorField(String stringLengthValidatorField) {
+        this.stringLengthValidatorField = stringLengthValidatorField;
+    }
+
+    public String getFieldExpressionValidatorField() {
+        return fieldExpressionValidatorField;
+    }
+
+	@FieldExpressionValidator(
+        expression = "(fieldExpressionValidatorField == requiredValidatorField)", 
+        message = "must be the same as the Required Validator Field if specified")
+    public void setFieldExpressionValidatorField(
+            String fieldExpressionValidatorField) {
+        this.fieldExpressionValidatorField = fieldExpressionValidatorField;
+    }
+
+    public String getUrlValidatorField() {
+        return urlValidatorField;
+    }
+
+    @UrlValidator(message="must be a valid url if supplied")
+    public void setUrlValidatorField(String urlValidatorField) {
+        this.urlValidatorField = urlValidatorField;
+    }
+}
+
+/**
+ * <!-- END SNIPPET: ajaxFormSubmit -->
+ */
+
+

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitSuccessAction.java
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitSuccessAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitSuccessAction.java
new file mode 100644
index 0000000..6eca3fc
--- /dev/null
+++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitSuccessAction.java
@@ -0,0 +1,7 @@
+package org.apache.struts2.showcase.validation;
+
+public class AjaxFormSubmitSuccessAction {
+	public String execute() {
+		return "success";
+	}
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/resources/struts-validation.xml
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/resources/struts-validation.xml b/apps/showcase/src/main/resources/struts-validation.xml
index bab906e..40b9899 100755
--- a/apps/showcase/src/main/resources/struts-validation.xml
+++ b/apps/showcase/src/main/resources/struts-validation.xml
@@ -37,6 +37,19 @@
             <result name="input">quiz-ajax.jsp</result>
             <result>quiz-success.jsp</result>
         </action>
+
+		<!-- =========================================== -->
+		<!-- === ajax form submit                    === -->
+		<!-- =========================================== -->
+		<action name="ajaxFormSubmit" class="org.apache.struts2.showcase.validation.AjaxFormSubmitAction">
+			<interceptor-ref name="jsonValidationWorkflowStack" />
+			<result name="input">/WEB-INF/validation/ajaxFormSubmit.jsp</result>
+			<result type="jsonActionRedirect">ajaxFormSubmitSuccess</result>
+		</action>
+		<action name="ajaxFormSubmitSuccess" class="org.apache.struts2.showcase.validation.AjaxFormSubmitSuccessAction">
+			<result>/WEB-INF/validation/ajaxFormSubmitSuccess.jsp</result>
+		</action>
+		
 	</package>
 
 

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl b/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl
new file mode 100644
index 0000000..3f7d8ab
--- /dev/null
+++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl
@@ -0,0 +1,46 @@
+<#--
+/*
+ * $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.
+ */
+-->
+<#--
+    Make sure element is always present. To be filled later via JS.
+-->
+<ul<#rt/>
+<#if parameters.id??>
+ id="${parameters.id?html}"<#rt/>
+</#if>            
+<#if parameters.cssClass??>
+ class="${parameters.cssClass?html}"<#rt/>
+<#else>
+ class="errorMessage"<#rt/>
+</#if>
+<#if parameters.cssStyle??>
+ style="${parameters.cssStyle?html}"<#rt/>
+</#if>
+>
+<#if (actionErrors?? && actionErrors?size > 0)>
+	<#list actionErrors as error>
+		<#if error??>
+            <li><span><#if parameters.escape>${error!?html}<#else>${error!}</#if></span><#rt/></li><#rt/>
+        </#if>
+	</#list>
+</#if>
+</ul>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl
new file mode 100644
index 0000000..7f95111
--- /dev/null
+++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl
@@ -0,0 +1,39 @@
+<#--
+/*
+ * $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.
+ */
+-->
+${parameters.after!}<#t/>
+    </td><#lt/>
+</tr>
+<#if (parameters.errorposition!"top") == 'bottom'>
+<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
+<#if hasFieldErrors>
+<tr errorFor="${parameters.id}">
+    <td class="tdErrorMessage" colspan="2"><#rt/>
+        <#if hasFieldErrors>
+            <#list fieldErrors[parameters.name] as error>
+                <div class="errorMessage">${error?html}</div><#t/>
+            </#list>
+        </#if>
+    </td><#lt/>
+</tr>
+</#if>
+</#if>

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl
new file mode 100644
index 0000000..c07b867
--- /dev/null
+++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl
@@ -0,0 +1,80 @@
+<#--
+/*
+ * $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.
+ */
+-->
+<#--
+	Always include elements to show errors. They may be filled later via AJAX.
+-->
+<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
+<#if (parameters.errorposition!"top") == 'top'>
+<tr errorFor="${parameters.id}">
+    <td class="tdErrorMessage" colspan="2" data-error-for-fieldname="${parameters.name}"><#rt/>
+        <#if hasFieldErrors>
+            <#list fieldErrors[parameters.name] as error>
+                <div class="errorMessage">${error?html}</div><#t/>
+            </#list>
+        </#if>
+    </td><#lt/>
+</tr>
+</#if>
+<#if !parameters.labelposition?? && (parameters.form.labelposition)??>
+<#assign labelpos = parameters.form.labelposition/>
+<#elseif parameters.labelposition??>
+<#assign labelpos = parameters.labelposition/>
+</#if>
+<#--
+	if the label position is top,
+	then give the label it's own row in the table
+-->
+<tr>
+<#if (labelpos!"") == 'top'>
+    <td class="tdLabelTop" colspan="2"><#rt/>
+<#else>
+    <td class="tdLabel"><#rt/>
+</#if>
+<#if parameters.label??>
+    <label <#t/>
+<#if parameters.id??>
+        for="${parameters.id?html}" <#t/>
+</#if>
+<#if hasFieldErrors>
+        class="errorLabel"<#t/>
+<#else>
+        class="label"<#t/>
+</#if>
+    ><#t/>
+<#if parameters.required!false && parameters.requiredPosition!"right" != 'right'>
+        <span class="required">*</span><#t/>
+</#if>
+${parameters.label?html}<#t/>
+<#if parameters.required!false && parameters.requiredPosition!"right" == 'right'>
+ <span class="required">*</span><#t/>
+</#if>
+${parameters.labelseparator!":"?html}<#t/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
+</label><#t/>
+</#if>
+    </td><#lt/>
+<#-- add the extra row -->
+<#if (labelpos!"") == 'top'>
+</tr>
+<tr>
+</#if>

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/resources/template/ajaxErrorContainers/theme.properties
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/theme.properties b/apps/showcase/src/main/resources/template/ajaxErrorContainers/theme.properties
new file mode 100644
index 0000000..81346c7
--- /dev/null
+++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/theme.properties
@@ -0,0 +1,21 @@
+#
+# $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.
+#
+parent = xhtml

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
index 22ffc60..4c25c58 100644
--- a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
+++ b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
@@ -188,6 +188,7 @@
                             <s:url var="clientSideValidationUrl" action="clientSideValidationExample" namespace="/validation"/>
                             <s:url var="storeMessageAcrossRequestExample" namespace="/validation" action="storeErrorsAcrossRequestExample"/>
                             <s:url var="beanValidationUrl" action="bean-validation" namespace="/bean-validation"/>
+                            <s:url var="ajaxFormSubmitUrl" action="ajaxFormSubmit" namespace="/validation" method="input"/>
                             <li><s:a href="%{beanValidationUrl}">Bean Validation</s:a></li>
                             <li><s:a href="%{fieldValidatorUrl}">Field Validators</s:a></li>
                             <li><s:a href="%{clientSideValidationUrl}">Field Validators with client-side JavaScript</s:a></li>
@@ -197,6 +198,7 @@
                             <li><s:a href="%{quizClient}">Validation (client)</s:a></li>
                             <li><s:a href="%{quizClientCss}">Validation (client using css_xhtml theme)</s:a></li>
                             <li><s:a href="%{visitorValidatorUrl}">Visitor Validator</s:a></li>
+                            <li><s:a href="%{ajaxFormSubmitUrl}">AJAX Form Submit</s:a></li>
                         </ul>
                     </li>
                     <li class="dropdown">

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp
new file mode 100644
index 0000000..c327802
--- /dev/null
+++ b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp
@@ -0,0 +1,177 @@
+<%@taglib prefix="s" uri="/struts-tags" %>
+
+<html>
+<head>
+    <title>Struts2 Showcase - Validation - AJAX Form Submit</title>
+    <s:head theme="xhtml"/>
+
+    <style type="text/css">
+        /* see comment of script element below! */
+        .ajaxVisualFeedback {
+            width: 16px;
+            height: 16px;
+            background-image: url('../images/indicator.gif');
+            background-repeat: no-repeat;
+            float: right;
+        }
+    </style>
+
+</head>
+<body>
+
+<div class="page-header">
+    <h1>AJAX Form Submit</h1>
+</div>
+
+<div class="container-fluid">
+    <div class="row">
+        <div class="col-md-12">
+
+            <!-- START SNIPPET: ajaxFormSubmit -->
+
+            <h3>Action Errors Will Appear Here</h3>
+            <s:actionerror theme="ajaxErrorContainers"/>
+
+            <hr/>
+
+            <s:form method="POST" theme="xhtml">
+                <s:textfield label="Required Validator Field" name="requiredValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="Required String Validator Field" name="requiredStringValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="Integer Validator Field" name="integerValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="Date Validator Field" name="dateValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="Email Validator Field" name="emailValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="URL Validator Field" name="urlValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="String Length Validator Field" name="stringLengthValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="Regex Validator Field" name="regexValidatorField" theme="ajaxErrorContainers"/>
+                <s:textfield label="Field Expression Validator Field" name="fieldExpressionValidatorField" theme="ajaxErrorContainers"/>
+                <s:submit label="Submit" cssClass="btn btn-primary"/>
+            </s:form>
+
+            <!-- END SNIPPET: ajaxFormSubmit -->
+        </div>
+    </div>
+</div>
+
+<script type="text/javascript">
+/********************************************************************
+ * JS just used on this page.
+ * Usually this would be placed in a JS file
+ * but as this showcase app is already hard to follow
+ * I place it here so it is easier to find.
+ *
+ * note: this requires jQuery.
+ *******************************************************************/
+
+ /**
+  * Validates given form per AJAX. To be called as onSubmit handler.
+  *
+  * @param event onSubmit event
+  */
+function ajaxFormValidation(event) {
+    event.preventDefault();
+    _removeValidationErrors();
+
+    var _form = $(event.target);
+    var _formData = _form.serialize(true);
+
+    // prepare visual feedback
+    // you may want to use other elements here
+    var originalButton = _form.find('.btn-primary');
+    // note: jQuery returns an array-like object
+    if (originalButton && originalButton.length && originalButton.length > 0) {
+        originalButton.hide();
+        var feedbackElement = $('<div class="ajaxVisualFeedback"></div>').insertAfter(originalButton);
+        var restoreFunction = function() {
+            originalButton.show();
+            feedbackElement.remove();
+        }
+    }
+
+
+    var options = {
+        data: 'struts.enableJSONValidation=true&struts.validateOnly=false&' + _formData,
+        async: true,
+        processData: false,
+        type: 'POST',
+        success: function (response, statusText, xhr) {
+            if (response.location) {
+                // no validation errors
+                // action has been executed and sent a redirect URL wrapped as JSON
+                // cannot use a normal http-redirect (status-code 3xx) as this would be followed by browsers and would not be available here
+
+                // follow JSON-redirect
+                window.location.href = response.location;
+            } else {
+                if (restoreFunction) {
+                    restoreFunction();
+                }
+                _handleValidationResult(_form, response);
+            }
+        },
+        error: function(xhr, textStatus, errorThrown) {
+            if (restoreFunction) {
+                restoreFunction();
+            }
+            // show user an error message
+            _handleValidationResult(_form, {errors: ['Network or server error!']})
+        }
+    }
+
+    // send request, after delay to make sure everybody notices the visual feedback :)
+    window.setTimeout(function() {
+        var url = _form[0].action;
+        jQuery.ajax(url, options);
+    }, 1000);
+}
+
+/**
+ * Removes validation errors from HTML DOM.
+ */
+function _removeValidationErrors() {
+    // action errors
+    // you might want to use a custom ID here
+    $('ul.errorMessage li').remove();
+
+    // field errors
+    $('div.errorMessage').remove();
+}
+
+/**
+ * Incorporates validation errors in HTML DOM.
+ *
+ * @param form Form containing errors.
+ * @param errors Errors from server.
+ * @returns {Boolean} True if form can be submitted.
+ */
+function _handleValidationResult(form, errors) {
+    // action errors
+    if (errors.errors) {
+        // you might want to use a custom ID here
+        var errorContainer = $('ul.errorMessage');
+        $.each(errors.errors, function(index, errorMsg) {
+            var li = $('<li><span></span></li>');
+            li.text(errorMsg);
+            errorContainer.append(li);
+        });
+    }
+
+    // field errors
+    if (errors.fieldErrors) {
+        $.each(errors.fieldErrors, function(fieldName, errorMsg) {
+            var td = $('td[data-error-for-fieldname="' + fieldName + '"]');
+            if (td) {
+                var div = $('<div class="errorMessage"></div>');
+                div.text(errorMsg);
+                td.append(div);
+            }
+        });
+    }
+}
+
+// register onSubmit handler
+$(window).bind('load', function() {
+    $('form').bind('submit', ajaxFormValidation);
+});
+</script>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmitSuccess.jsp
----------------------------------------------------------------------
diff --git a/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmitSuccess.jsp b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmitSuccess.jsp
new file mode 100644
index 0000000..f8a0731
--- /dev/null
+++ b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmitSuccess.jsp
@@ -0,0 +1,17 @@
+<%@taglib prefix="s" uri="/struts-tags" %>
+<html>
+<head>
+	<title>Struts2 Showcase - Validation - Success Field Validators Example</title>
+	<s:head/>
+</head>
+<body>
+
+<div class="page-header">
+	<h1>Success !</h1>
+</div>
+
+<div class="container-fluid">
+Form has been submitted.
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
new file mode 100644
index 0000000..f0f3f39
--- /dev/null
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
@@ -0,0 +1,71 @@
+package org.apache.struts2.json;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.result.ServletActionRedirectResult;
+
+/**
+ * Specialized form of {@link ServletActionRedirectResult} which takes care of
+ * situation that browser has a JS/AJAX context, there are no validation errors
+ * and action is executed. In this case a http redirect is harmful as browsers
+ * don't pass them to JS handlers. So this result produces a JSON response
+ * containing redirect data.
+ *
+ *<p>
+ * To be used along with {@link JSONValidationInterceptor}.
+ *</p>
+ *<p>
+ * Response JSON looks like this:
+ * <pre>{"location": "$redirect url$"}</pre>
+ *</p>
+ *
+ */
+public class JSONActionRedirectResult extends ServletActionRedirectResult {
+
+    private static final long serialVersionUID = 3107276294073879542L;
+
+    @Override
+	protected void sendRedirect(HttpServletResponse response, String finalLocation) throws IOException {
+        if (sendJsonInsteadOfRedirect()) {
+            printJson(response, finalLocation);
+        } else {
+            super.sendRedirect(response, finalLocation);
+        }
+    }
+
+    /**
+     * If browser has called action in a JS/AJAX context we cannot send a
+     * redirect as response.
+     *
+     * @return true if a JSON response shall be generated, false if a redirect
+     *         shall be sent.
+     */
+    static boolean sendJsonInsteadOfRedirect() {
+        HttpServletRequest request = ServletActionContext.getRequest();
+        return isJsonEnabled(request) && !isValidateOnly(request);
+    }
+
+    static void printJson(HttpServletResponse response, String finalLocation) throws IOException {
+        response.setStatus(HttpServletResponse.SC_OK);
+        response.setContentType("application/json");
+        response.setHeader("Location", finalLocation);
+        PrintWriter writer = response.getWriter();
+        writer.write("{\"location\": \"");
+        writer.write(finalLocation);
+        writer.write("\"}");
+        writer.close();
+    }
+
+    private static boolean isJsonEnabled(HttpServletRequest request) {
+        return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_JSON_PARAM));
+    }
+
+    private static boolean isValidateOnly(HttpServletRequest request) {
+        return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_ONLY_PARAM));
+    }
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
index f895053..0fc7902 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
@@ -61,6 +61,8 @@ import java.util.Map;
  * <p>If the request has a parameter 'struts.validateOnly' execution will return after
  * validation (action won't be executed).</p>
  *
+ * <p>If 'struts.validateOnly' is set to false you may want to use {@link JSONActionRedirectResult}.</p>
+ *
  * <p>A request parameter named 'struts.enableJSONValidation' must be set to 'true' to
  * use this interceptor</p>
  *
@@ -72,8 +74,8 @@ public class JSONValidationInterceptor extends MethodFilterInterceptor {
 
     private static final Logger LOG = LogManager.getLogger(JSONValidationInterceptor.class);
 
-    private static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
-    private static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
+    static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
+    static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
     private static final String NO_ENCODING_SET_PARAM = "struts.JSONValidation.no.encoding";
 
     private static final String DEFAULT_ENCODING = "UTF-8";

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/plugins/json/src/main/resources/struts-plugin.xml
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/resources/struts-plugin.xml b/plugins/json/src/main/resources/struts-plugin.xml
index 5abfbea..58c06c7 100644
--- a/plugins/json/src/main/resources/struts-plugin.xml
+++ b/plugins/json/src/main/resources/struts-plugin.xml
@@ -9,6 +9,7 @@
 
         <result-types>
             <result-type name="json" class="org.apache.struts2.json.JSONResult"/>
+            <result-type name="jsonActionRedirect" class="org.apache.struts2.json.JSONActionRedirectResult"/>
         </result-types>
 
         <interceptors>

http://git-wip-us.apache.org/repos/asf/struts/blob/a35a9a82/plugins/json/src/test/java/org/apache/struts2/json/JSONActionRedirectResultTest.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/test/java/org/apache/struts2/json/JSONActionRedirectResultTest.java b/plugins/json/src/test/java/org/apache/struts2/json/JSONActionRedirectResultTest.java
new file mode 100644
index 0000000..c98e41a
--- /dev/null
+++ b/plugins/json/src/test/java/org/apache/struts2/json/JSONActionRedirectResultTest.java
@@ -0,0 +1,105 @@
+package org.apache.struts2.json;
+
+import org.apache.struts2.StrutsStatics;
+import org.apache.struts2.StrutsTestCase;
+import org.apache.struts2.dispatcher.mapper.DefaultActionMapper;
+import org.apache.struts2.views.util.DefaultUrlHelper;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.mock.web.MockServletContext;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.config.entities.ActionConfig;
+import com.opensymphony.xwork2.mock.MockActionInvocation;
+import com.opensymphony.xwork2.mock.MockActionProxy;
+import com.opensymphony.xwork2.util.ValueStack;
+
+public class JSONActionRedirectResultTest extends StrutsTestCase {
+
+    MockActionInvocation invocation;
+    MockHttpServletResponse response;
+    MockServletContext servletContext;
+    ActionContext context;
+    ValueStack stack;
+    MockHttpServletRequest request;
+
+    public void testNormalRedirect() throws Exception {
+        JSONActionRedirectResult result = new JSONActionRedirectResult();
+        result.setActionName("targetAction");
+        result.setActionMapper(new DefaultActionMapper());
+        result.setUrlHelper(new DefaultUrlHelper());
+
+        Object action = new Object();
+        stack.push(action);
+
+        this.invocation.setAction(action);
+        result.execute(this.invocation);
+
+        String content = response.getContentAsString();
+        assertEquals("", content);
+        String location = response.getHeader("Location");
+        assertEquals("/targetAction.action", location);
+        assertEquals(302, response.getStatus());
+    }
+
+    public void testJsonRedirect() throws Exception {
+        JSONActionRedirectResult result = new JSONActionRedirectResult();
+        result.setActionName("targetAction");
+        result.setActionMapper(new DefaultActionMapper());
+        result.setUrlHelper(new DefaultUrlHelper());
+
+        request.setParameter("struts.enableJSONValidation", "true");
+        request.setParameter("struts.validateOnly", "false");
+
+        Object action = new Object();
+        stack.push(action);
+
+        this.invocation.setAction(action);
+        result.execute(this.invocation);
+
+        String content = response.getContentAsString();
+        assertEquals("{\"location\": \"/targetAction.action\"}", content);
+        assertEquals(200, response.getStatus());
+    }
+
+    public void testValidateOnlyFalse() throws Exception {
+        JSONActionRedirectResult result = new JSONActionRedirectResult();
+        result.setActionName("targetAction");
+        result.setActionMapper(new DefaultActionMapper());
+        result.setUrlHelper(new DefaultUrlHelper());
+
+        request.setParameter("struts.enableJSONValidation", "true");
+        request.setParameter("struts.validateOnly", "true");
+
+        Object action = new Object();
+        stack.push(action);
+
+        this.invocation.setAction(action);
+        result.execute(this.invocation);
+
+        String content = response.getContentAsString();
+        assertEquals("", content);
+        String location = response.getHeader("Location");
+        assertEquals("/targetAction.action", location);
+        assertEquals(302, response.getStatus());
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        this.response = new MockHttpServletResponse();
+        this.request = new MockHttpServletRequest();
+        this.context = ActionContext.getContext();
+        this.context.put(StrutsStatics.HTTP_RESPONSE, this.response);
+        this.context.put(StrutsStatics.HTTP_REQUEST, this.request);
+        this.stack = context.getValueStack();
+        this.servletContext = new MockServletContext();
+        this.context.put(StrutsStatics.SERVLET_CONTEXT, this.servletContext);
+        this.invocation = new MockActionInvocation();
+        this.invocation.setInvocationContext(this.context);
+        this.invocation.setStack(this.stack);
+        MockActionProxy mockActionProxy = new MockActionProxy();
+        mockActionProxy.setConfig(new ActionConfig.Builder(null, null, null).build());
+        this.invocation.setProxy(mockActionProxy);
+    }
+}


[15/50] [abbrv] struts git commit: Drops Tiles 3 plugin

Posted by lu...@apache.org.
Drops Tiles 3 plugin


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

Branch: refs/heads/master
Commit: 9f665f7b239b9c1a266832c7274d9e38c1c0137f
Parents: bdb3b2e
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Tue Jan 12 08:19:26 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Tue Jan 19 16:18:01 2016 +0100

----------------------------------------------------------------------
 plugins/tiles3/pom.xml                          |  60 -------
 .../apache/struts2/views/tiles/TilesResult.java |  81 ---------
 plugins/tiles3/src/main/resources/LICENSE.txt   | 174 -------------------
 plugins/tiles3/src/main/resources/NOTICE.txt    |   5 -
 .../tiles3/src/main/resources/struts-plugin.xml |  34 ----
 plugins/tiles3/src/site/site.xml                |  57 ------
 6 files changed, 411 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/9f665f7b/plugins/tiles3/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/tiles3/pom.xml b/plugins/tiles3/pom.xml
deleted file mode 100644
index a029dff..0000000
--- a/plugins/tiles3/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * $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.
- */
--->
-<project xmlns="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">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.struts</groupId>
-        <artifactId>struts2-plugins</artifactId>
-        <version>2.5-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>struts2-tiles3-plugin</artifactId>
-    <packaging>jar</packaging>
-    <name>Struts 2 Tiles 3 Plugin</name>
-
-    <properties>
-        <tiles3.version>3.0.1</tiles3.version>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tiles</groupId>
-            <artifactId>tiles-core</artifactId>
-            <version>${tiles3.version}</version> <!-- Version must defined here -->
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tiles</groupId>
-            <artifactId>tiles-extras</artifactId>
-            <version>${tiles3.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tiles</groupId>
-            <artifactId>tiles-jsp</artifactId>
-            <version>${tiles3.version}</version>
-            <scope>runtime</scope>
-        </dependency>
-
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/struts/blob/9f665f7b/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
----------------------------------------------------------------------
diff --git a/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java b/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
deleted file mode 100644
index 6bc15bb..0000000
--- a/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
+++ /dev/null
@@ -1,81 +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.views.tiles;
-
-import com.opensymphony.xwork2.ActionInvocation;
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.result.ServletDispatcherResult;
-import org.apache.tiles.TilesContainer;
-import org.apache.tiles.access.TilesAccess;
-import org.apache.tiles.request.ApplicationContext;
-import org.apache.tiles.request.servlet.ServletRequest;
-import org.apache.tiles.request.servlet.ServletUtil;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * First implementation of Tiles 3 support
- *
- * Please follow the link to read more how to configure the result
- * http://stackoverflow.com/questions/13337938/how-to-integrate-struts-2-with-tiles-3
- *
- * or check the docs
- *
- * https://cwiki.apache.org/confluence/display/WW/Tiles+3+Plugin
- *
- *
- * @author Ken McWilliams
- */
-public class TilesResult extends ServletDispatcherResult {
-
-    public TilesResult() {
-        super();
-    }
-
-    public TilesResult(String location) {
-        super(location);
-    }
-
-    @Override
-    public void doExecute(String location, ActionInvocation invocation) throws Exception {
-        ServletContext context = ServletActionContext.getServletContext();
-        HttpServletRequest request = ServletActionContext.getRequest();
-        HttpServletResponse response = ServletActionContext.getResponse();
-
-        ApplicationContext applicationContext = ServletUtil.getApplicationContext(context);
-        ServletRequest servletRequest = new ServletRequest(applicationContext, request, response);
-
-        TilesContainer container = initTilesContainer(applicationContext, servletRequest);
-
-        container.startContext(servletRequest);
-        container.render(location, servletRequest);
-    }
-
-    protected TilesContainer initTilesContainer(ApplicationContext applicationContext, ServletRequest servletRequest) {
-        TilesContainer container = TilesAccess.getContainer(applicationContext);
-        TilesAccess.setCurrentContainer(servletRequest, container);
-        return container;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/9f665f7b/plugins/tiles3/src/main/resources/LICENSE.txt
----------------------------------------------------------------------
diff --git a/plugins/tiles3/src/main/resources/LICENSE.txt b/plugins/tiles3/src/main/resources/LICENSE.txt
deleted file mode 100644
index dd5b3a5..0000000
--- a/plugins/tiles3/src/main/resources/LICENSE.txt
+++ /dev/null
@@ -1,174 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.

http://git-wip-us.apache.org/repos/asf/struts/blob/9f665f7b/plugins/tiles3/src/main/resources/NOTICE.txt
----------------------------------------------------------------------
diff --git a/plugins/tiles3/src/main/resources/NOTICE.txt b/plugins/tiles3/src/main/resources/NOTICE.txt
deleted file mode 100644
index bfba90c..0000000
--- a/plugins/tiles3/src/main/resources/NOTICE.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Struts
-Copyright 2000-2011 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/9f665f7b/plugins/tiles3/src/main/resources/struts-plugin.xml
----------------------------------------------------------------------
diff --git a/plugins/tiles3/src/main/resources/struts-plugin.xml b/plugins/tiles3/src/main/resources/struts-plugin.xml
deleted file mode 100644
index 0018a5f..0000000
--- a/plugins/tiles3/src/main/resources/struts-plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-/*
- * $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.
- */
--->
-<!DOCTYPE struts PUBLIC
-	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
-	"http://struts.apache.org/dtds/struts-2.3.dtd">
-
-<struts>
-    <package name="tiles-default" extends="struts-default">
-        <result-types>
-            <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
-        </result-types>
-    </package>
-</struts>

http://git-wip-us.apache.org/repos/asf/struts/blob/9f665f7b/plugins/tiles3/src/site/site.xml
----------------------------------------------------------------------
diff --git a/plugins/tiles3/src/site/site.xml b/plugins/tiles3/src/site/site.xml
deleted file mode 100644
index 07a667e..0000000
--- a/plugins/tiles3/src/site/site.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-/*
- * 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.
- */
--->
-<project name="Struts 2">
-    <skin>
-        <groupId>org.apache.maven.skins</groupId>
-        <artifactId>maven-fluido-skin</artifactId>
-        <version>1.3.1</version>
-    </skin>
-    <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org/</href>
-    </bannerLeft>
-    <bannerRight>
-        <name>Apache Struts</name>
-        <src>http://struts.apache.org/img/struts-logo.svg</src>
-        <href>http://struts.apache.org/</href>
-    </bannerRight>
-    <publishDate position="none"/>
-    <version position="none"/>
-    <body>
-        <links>
-            <item name="Apache" href="http://www.apache.org/"/>
-            <item name="Struts" href="http://struts.apache.org/"/>
-        </links>
-
-        <menu ref="parent"/>
-        <menu ref="reports"/>
-
-        <footer>
-            <div class="row span12">
-                Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts
-                project logos are trademarks of The Apache Software Foundation.
-            </div>
-        </footer>
-
-    </body>
-</project>