From fab687a07e8d873c82465b29188100debf61097f Mon Sep 17 00:00:00 2001 From: victorsosa Date: Mon, 15 Feb 2016 08:28:01 -0400 Subject: [PATCH 01/31] fix patch WW-4558 contentType override ignored for JSONInterceptor From now on: The "accept" request header parameter must be "application/json" or "application/json-rpc" Also the default encoding is "UTF-8" --- .../apache/struts2/json/JSONInterceptor.java | 6 +-- .../struts2/json/JSONInterceptorTest.java | 37 ++++++++++--------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java index 673187189..11488fed5 100644 --- a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java +++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java @@ -58,7 +58,7 @@ public class JSONInterceptor extends AbstractInterceptor { private boolean enableGZIP = false; private boolean wrapWithComments; private boolean prefix; - private String defaultEncoding = "ISO-8859-1"; + private String defaultEncoding = "UTF-8"; private boolean ignoreHierarchy = true; private String root; private List excludeProperties; @@ -76,7 +76,7 @@ public class JSONInterceptor extends AbstractInterceptor { public String intercept(ActionInvocation invocation) throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); - String contentType = request.getHeader("content-type"); + contentType = request.getHeader("accept"); if (contentType != null) { int iSemicolonIdx; if ((iSemicolonIdx = contentType.indexOf(";")) != -1) @@ -181,7 +181,7 @@ public class JSONInterceptor extends AbstractInterceptor { return Action.NONE; } else { - LOG.debug("Content type must be 'application/json' or 'application/json-rpc'. Ignoring request with content type ", contentType); + LOG.debug("Accept header parameter must be 'application/json' or 'application/json-rpc'. Ignoring request with accept ", contentType); } return invocation.invoke(); diff --git a/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java b/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java index 7bf53d328..ddae71613 100644 --- a/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java +++ b/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java @@ -71,7 +71,7 @@ public class JSONInterceptorTest extends StrutsTestCase { private void tryBadJSON(String fileName) throws Exception { // request setRequestContent(fileName); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -92,7 +92,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDDisabledSMD() throws Exception { // request setRequestContent("smd-3.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); SMDActionTest1 action = new SMDActionTest1(); @@ -111,7 +111,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDAliasedMethodCall1() throws Exception { // request setRequestContent("smd-14.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -129,7 +129,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDAliasedMethodCall2() throws Exception { // request setRequestContent("smd-15.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -147,7 +147,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDNoMethod() throws Exception { // request setRequestContent("smd-4.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -171,7 +171,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDMethodWithoutAnnotations() throws Exception { // request setRequestContent("smd-9.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -192,7 +192,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDPrimitivesNoResult() throws Exception { // request setRequestContent("smd-6.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -221,13 +221,13 @@ public class JSONInterceptorTest extends StrutsTestCase { String normalizedExpected = TestUtils.normalize(JSONResultTest.class.getResource("smd-11.txt")); assertEquals(normalizedExpected, normalizedActual); - assertEquals("application/json;charset=ISO-8859-1", response.getContentType()); + assertEquals("application/json;charset=UTF-8", response.getContentType()); } public void testSMDReturnObject() throws Exception { // request setRequestContent("smd-10.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -245,14 +245,14 @@ public class JSONInterceptorTest extends StrutsTestCase { String normalizedExpected = TestUtils.normalize(JSONResultTest.class.getResource("smd-12.txt")); assertEquals(normalizedExpected, normalizedActual); - assertEquals("application/json;charset=ISO-8859-1", response.getContentType()); + assertEquals("application/json;charset=UTF-8", response.getContentType()); } @SuppressWarnings("unchecked") public void testSMDObjectsNoResult() throws Exception { // request setRequestContent("smd-7.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -293,14 +293,14 @@ public class JSONInterceptorTest extends StrutsTestCase { String normalizedExpected = TestUtils.normalize(JSONResultTest.class.getResource("smd-11.txt")); assertEquals(normalizedExpected, normalizedActual); - assertEquals("application/json;charset=ISO-8859-1", response.getContentType()); + assertEquals("application/json;charset=UTF-8", response.getContentType()); } @SuppressWarnings( { "unchecked", "unchecked" }) public void testReadEmpty() throws Exception { // request setRequestContent("json-6.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -315,7 +315,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void test() throws Exception { // request setRequestContent("json-1.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -437,7 +437,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testRoot() throws Exception { setRequestContent("json-5.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -462,7 +462,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testJSONArray() throws Exception { setRequestContent("json-12.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -488,7 +488,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testJSONArray2() throws Exception { setRequestContent("json-12.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -536,6 +536,9 @@ public class JSONInterceptorTest extends StrutsTestCase { } class MockActionInvocationEx extends MockActionInvocation { + + private static final long serialVersionUID = 3057703805130170757L; + private boolean invoked; @Override From 0d4905038119f614f021af5738154079b30bca24 Mon Sep 17 00:00:00 2001 From: victorsosa Date: Mon, 15 Feb 2016 08:28:01 -0400 Subject: [PATCH 02/31] fix patch WW-4558 contentType override ignored for JSONInterceptor use of accept parameter st by the interceptor params Signed-off-by: victorsosa --- .../apache/struts2/json/JSONInterceptor.java | 27 ++++++++------ .../struts2/json/JSONInterceptorTest.java | 37 ++++++++++--------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java index 673187189..207d0142c 100644 --- a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java +++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java @@ -58,7 +58,7 @@ public class JSONInterceptor extends AbstractInterceptor { private boolean enableGZIP = false; private boolean wrapWithComments; private boolean prefix; - private String defaultEncoding = "ISO-8859-1"; + private String defaultEncoding = "UTF-8"; private boolean ignoreHierarchy = true; private String root; private List excludeProperties; @@ -70,17 +70,22 @@ public class JSONInterceptor extends AbstractInterceptor { private boolean noCache = false; private boolean excludeNullProperties; private String callbackParameter; - private String contentType; + private String accept; @SuppressWarnings("unchecked") public String intercept(ActionInvocation invocation) throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); - String contentType = request.getHeader("content-type"); - if (contentType != null) { + + //parameter wasn't set by the interceptor + if (accept == null) { + accept = request.getHeader("accept"); + } + + if (accept != null) { int iSemicolonIdx; - if ((iSemicolonIdx = contentType.indexOf(";")) != -1) - contentType = contentType.substring(0, iSemicolonIdx); + if ((iSemicolonIdx = accept.indexOf(";")) != -1) + accept = accept.substring(0, iSemicolonIdx); } Object rootObject = null; @@ -93,7 +98,7 @@ public class JSONInterceptor extends AbstractInterceptor { } } - if ((contentType != null) && contentType.equalsIgnoreCase("application/json")) { + if ((accept != null) && accept.equalsIgnoreCase("application/json")) { // load JSON object Object obj = JSONUtil.deserialize(request.getReader()); @@ -133,7 +138,7 @@ public class JSONInterceptor extends AbstractInterceptor { LOG.error("Unable to deserialize JSON object from request"); throw new JSONException("Unable to deserialize JSON object from request"); } - } else if ((contentType != null) && contentType.equalsIgnoreCase("application/json-rpc")) { + } else if ((accept != null) && accept.equalsIgnoreCase("application/json-rpc")) { Object result; if (this.enableSMD) { // load JSON object @@ -181,7 +186,7 @@ public class JSONInterceptor extends AbstractInterceptor { return Action.NONE; } else { - LOG.debug("Content type must be 'application/json' or 'application/json-rpc'. Ignoring request with content type ", contentType); + LOG.debug("Accept header parameter must be 'application/json' or 'application/json-rpc'. Ignoring request with accept ", accept); } return invocation.invoke(); @@ -535,7 +540,7 @@ public class JSONInterceptor extends AbstractInterceptor { this.prefix = prefix; } - public void setContentType(String contentType) { - this.contentType = contentType; + public void setAccept(String accept) { + this.accept = accept; } } diff --git a/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java b/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java index 7bf53d328..ddae71613 100644 --- a/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java +++ b/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java @@ -71,7 +71,7 @@ public class JSONInterceptorTest extends StrutsTestCase { private void tryBadJSON(String fileName) throws Exception { // request setRequestContent(fileName); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -92,7 +92,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDDisabledSMD() throws Exception { // request setRequestContent("smd-3.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); SMDActionTest1 action = new SMDActionTest1(); @@ -111,7 +111,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDAliasedMethodCall1() throws Exception { // request setRequestContent("smd-14.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -129,7 +129,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDAliasedMethodCall2() throws Exception { // request setRequestContent("smd-15.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -147,7 +147,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDNoMethod() throws Exception { // request setRequestContent("smd-4.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -171,7 +171,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDMethodWithoutAnnotations() throws Exception { // request setRequestContent("smd-9.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -192,7 +192,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testSMDPrimitivesNoResult() throws Exception { // request setRequestContent("smd-6.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -221,13 +221,13 @@ public class JSONInterceptorTest extends StrutsTestCase { String normalizedExpected = TestUtils.normalize(JSONResultTest.class.getResource("smd-11.txt")); assertEquals(normalizedExpected, normalizedActual); - assertEquals("application/json;charset=ISO-8859-1", response.getContentType()); + assertEquals("application/json;charset=UTF-8", response.getContentType()); } public void testSMDReturnObject() throws Exception { // request setRequestContent("smd-10.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -245,14 +245,14 @@ public class JSONInterceptorTest extends StrutsTestCase { String normalizedExpected = TestUtils.normalize(JSONResultTest.class.getResource("smd-12.txt")); assertEquals(normalizedExpected, normalizedActual); - assertEquals("application/json;charset=ISO-8859-1", response.getContentType()); + assertEquals("application/json;charset=UTF-8", response.getContentType()); } @SuppressWarnings("unchecked") public void testSMDObjectsNoResult() throws Exception { // request setRequestContent("smd-7.txt"); - this.request.addHeader("content-type", "application/json-rpc"); + this.request.addHeader("accept", "application/json-rpc"); JSONInterceptor interceptor = new JSONInterceptor(); interceptor.setEnableSMD(true); @@ -293,14 +293,14 @@ public class JSONInterceptorTest extends StrutsTestCase { String normalizedExpected = TestUtils.normalize(JSONResultTest.class.getResource("smd-11.txt")); assertEquals(normalizedExpected, normalizedActual); - assertEquals("application/json;charset=ISO-8859-1", response.getContentType()); + assertEquals("application/json;charset=UTF-8", response.getContentType()); } @SuppressWarnings( { "unchecked", "unchecked" }) public void testReadEmpty() throws Exception { // request setRequestContent("json-6.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -315,7 +315,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void test() throws Exception { // request setRequestContent("json-1.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -437,7 +437,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testRoot() throws Exception { setRequestContent("json-5.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -462,7 +462,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testJSONArray() throws Exception { setRequestContent("json-12.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -488,7 +488,7 @@ public class JSONInterceptorTest extends StrutsTestCase { public void testJSONArray2() throws Exception { setRequestContent("json-12.txt"); - this.request.addHeader("content-type", "application/json"); + this.request.addHeader("accept", "application/json"); // interceptor JSONInterceptor interceptor = new JSONInterceptor(); @@ -536,6 +536,9 @@ public class JSONInterceptorTest extends StrutsTestCase { } class MockActionInvocationEx extends MockActionInvocation { + + private static final long serialVersionUID = 3057703805130170757L; + private boolean invoked; @Override From d16aa65098b5c830d26eb32c00006f793f485036 Mon Sep 17 00:00:00 2001 From: victorsosa Date: Fri, 6 May 2016 18:04:04 -0400 Subject: [PATCH 03/31] remove old second contentType parameter --- .../main/java/org/apache/struts2/json/JSONInterceptor.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java index 5beb8dff7..ba775d32c 100644 --- a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java +++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java @@ -82,12 +82,6 @@ public class JSONInterceptor extends AbstractInterceptor { accept = request.getHeader("accept"); } - if (accept != null) { - int iSemicolonIdx; - if ((iSemicolonIdx = accept.indexOf(";")) != -1) - accept = accept.substring(0, iSemicolonIdx); - } - Object rootObject = null; final ValueStack stack = invocation.getStack(); if (this.root != null) { From d06c71d68e5c10990386e8904ca60927ed209250 Mon Sep 17 00:00:00 2001 From: victorsosa Date: Tue, 17 May 2016 09:03:27 -0400 Subject: [PATCH 04/31] WW-4634 --- core/src/main/resources/template/xhtml/controlheader.ftl | 2 +- core/src/main/resources/template/xhtml/styles.css | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/template/xhtml/controlheader.ftl b/core/src/main/resources/template/xhtml/controlheader.ftl index eeebe9f7c..8b855b821 100644 --- a/core/src/main/resources/template/xhtml/controlheader.ftl +++ b/core/src/main/resources/template/xhtml/controlheader.ftl @@ -23,6 +23,6 @@ <#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl" /> - class="tdAlign${parameters.align?html}" + class="tdAlign-${parameters.align?html}" ><#t/> diff --git a/core/src/main/resources/template/xhtml/styles.css b/core/src/main/resources/template/xhtml/styles.css index 383578b1c..fe205179e 100644 --- a/core/src/main/resources/template/xhtml/styles.css +++ b/core/src/main/resources/template/xhtml/styles.css @@ -36,7 +36,7 @@ .tdErrorMessage {text-align:center; vertical-align:top;} .formButton {text-align:right;} -.tdAligncenter{text-align:center;} -.tdAlignright{text-align:right;} -.tdAlignleft{text-align:left;} -.tdAlignjustify{text-align:justify;} +.tdAlign-center{text-align:center;} +.tdAlign-right{text-align:right;} +.tdAlign-left{text-align:left;} +.tdAlign-justify{text-align:justify;} From 9e11b2c2b1962d3bcaa1c2744ecda56f42e21b77 Mon Sep 17 00:00:00 2001 From: victorsosa Date: Tue, 17 May 2016 09:17:35 -0400 Subject: [PATCH 05/31] WW-4634 --- core/src/main/resources/template/xhtml/controlheader.ftl | 2 +- core/src/main/resources/template/xhtml/styles.css | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/template/xhtml/controlheader.ftl b/core/src/main/resources/template/xhtml/controlheader.ftl index 8b855b821..ed8f63ac8 100644 --- a/core/src/main/resources/template/xhtml/controlheader.ftl +++ b/core/src/main/resources/template/xhtml/controlheader.ftl @@ -23,6 +23,6 @@ <#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl" /> - class="tdAlign-${parameters.align?html}" + class="align-${parameters.align?html}" ><#t/> diff --git a/core/src/main/resources/template/xhtml/styles.css b/core/src/main/resources/template/xhtml/styles.css index fe205179e..c292a69df 100644 --- a/core/src/main/resources/template/xhtml/styles.css +++ b/core/src/main/resources/template/xhtml/styles.css @@ -36,7 +36,7 @@ .tdErrorMessage {text-align:center; vertical-align:top;} .formButton {text-align:right;} -.tdAlign-center{text-align:center;} -.tdAlign-right{text-align:right;} -.tdAlign-left{text-align:left;} -.tdAlign-justify{text-align:justify;} +.align-center{text-align:center;} +.align-right{text-align:right;} +.align-left{text-align:left;} +.align-justify{text-align:justify;} From 9b34a28190b71f73c26564ce06139aa4e4861e18 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Mon, 23 May 2016 16:02:25 +0200 Subject: [PATCH 06/31] Disallows dot in action name --- .../dispatcher/mapper/DefaultActionMapper.java | 2 +- .../dispatcher/mapper/DefaultActionMapperTest.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java index d0e89beef..1396025fc 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java @@ -120,7 +120,7 @@ public class DefaultActionMapper implements ActionMapper { protected boolean allowSlashesInActionNames = false; protected boolean alwaysSelectFullNamespace = false; protected PrefixTrie prefixTrie = null; - protected Pattern allowedActionNames = Pattern.compile("[a-zA-Z0-9._!/\\-]*"); + protected Pattern allowedActionNames = Pattern.compile("^[a-zA-Z0-9_!/\\-]+((.htm[l]?)|(.action))?$"); private boolean allowActionPrefix = false; private boolean allowActionCrossNamespaceAccess = false; diff --git a/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java b/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java index 69bb7de77..b51f56929 100644 --- a/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java +++ b/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java @@ -163,8 +163,8 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { public void testGetMappingWithNamespaceSlash() throws Exception { - req.setupGetRequestURI("/my.hh/abc.action"); - req.setupGetServletPath("/my.hh/abc.action"); + req.setupGetRequestURI("/my-hh/abc.action"); + req.setupGetServletPath("/my-hh/abc.action"); req.setupGetAttribute(null); req.addExpectedGetAttributeName("javax.servlet.include.servlet_path"); @@ -181,7 +181,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { mapping = mapper.getMapping(req, configManager); assertEquals("", mapping.getNamespace()); - assertEquals("my.hh/abc", mapping.getName()); + assertEquals("my-hh/abc", mapping.getName()); } public void testGetMappingWithUnknownNamespace() throws Exception { @@ -855,7 +855,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { expected = t; } assertTrue(expected instanceof StrutsException); - assertEquals("Action [${action}] does not match allowed action names pattern [[a-zA-Z0-9._!/\\-]*]!", expected.getMessage()); + assertEquals("Action [${action}] does not match allowed action names pattern [" + mapper.allowedActionNames.pattern() + "]!", expected.getMessage()); actionName = "${${%{action}}}"; try { @@ -865,7 +865,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { expected = t; } assertTrue(expected instanceof StrutsException); - assertEquals("Action [${${%{action}}}] does not match allowed action names pattern [[a-zA-Z0-9._!/\\-]*]!", expected.getMessage()); + assertEquals("Action [${${%{action}}}] does not match allowed action names pattern [" + mapper.allowedActionNames.pattern() + "]!", expected.getMessage()); actionName = "${#foo='action',#foo}"; try { @@ -875,7 +875,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase { expected = t; } assertTrue(expected instanceof StrutsException); - assertEquals("Action [${#foo='action',#foo}] does not match allowed action names pattern [[a-zA-Z0-9._!/\\-]*]!", expected.getMessage()); + assertEquals("Action [${#foo='action',#foo}] does not match allowed action names pattern [" + mapper.allowedActionNames.pattern() + "]!", expected.getMessage()); actionName = "test-action"; assertEquals("test-action", mapper.cleanupActionName(actionName)); From 095960b5691d33f127000794b3e79638cf384652 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Mon, 23 May 2016 17:04:38 +0200 Subject: [PATCH 07/31] Allows empty string as a action name --- .../apache/struts2/dispatcher/mapper/DefaultActionMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java index 1396025fc..005f9f201 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java @@ -120,7 +120,7 @@ public class DefaultActionMapper implements ActionMapper { protected boolean allowSlashesInActionNames = false; protected boolean alwaysSelectFullNamespace = false; protected PrefixTrie prefixTrie = null; - protected Pattern allowedActionNames = Pattern.compile("^[a-zA-Z0-9_!/\\-]+((.htm[l]?)|(.action))?$"); + protected Pattern allowedActionNames = Pattern.compile("^[a-zA-Z0-9_!/\\-]*((.htm[l]?)|(.action))?$"); private boolean allowActionPrefix = false; private boolean allowActionCrossNamespaceAccess = false; From 175d0d42dbb063ad999fef96493ed3b75b9b2c58 Mon Sep 17 00:00:00 2001 From: victorsosa Date: Wed, 25 May 2016 07:52:23 -0400 Subject: [PATCH 08/31] Add a class .tdInput for future and use align attribute with class="align-${parameters.align?html}" --- core/src/main/resources/template/xhtml/controlheader.ftl | 6 ++++-- core/src/main/resources/template/xhtml/styles.css | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/template/xhtml/controlheader.ftl b/core/src/main/resources/template/xhtml/controlheader.ftl index ed8f63ac8..c14779e5a 100644 --- a/core/src/main/resources/template/xhtml/controlheader.ftl +++ b/core/src/main/resources/template/xhtml/controlheader.ftl @@ -22,7 +22,9 @@ --> <#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl" /> - class="align-${parameters.align?html}" + <#if parameters.align?? > + class="align-${parameters.align?html}" + <#else > + class="tdInput" ><#t/> diff --git a/core/src/main/resources/template/xhtml/styles.css b/core/src/main/resources/template/xhtml/styles.css index c292a69df..fce6563d8 100644 --- a/core/src/main/resources/template/xhtml/styles.css +++ b/core/src/main/resources/template/xhtml/styles.css @@ -34,6 +34,7 @@ .tdCheckboxInput {text-align:left; vertical-align:top;} .tdCheckboxErrorMessage {text-align:left; vertical-align:top;} .tdErrorMessage {text-align:center; vertical-align:top;} +.tdInput {text-align:left;} .formButton {text-align:right;} .align-center{text-align:center;} From c70f2409f2facb8d30cb19d3e9c12946cafc4c53 Mon Sep 17 00:00:00 2001 From: victor sosa Date: Wed, 25 May 2016 08:29:20 -0400 Subject: [PATCH 09/31] Update styles.css --- core/src/main/resources/template/xhtml/styles.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/resources/template/xhtml/styles.css b/core/src/main/resources/template/xhtml/styles.css index fce6563d8..4cc1d35e0 100644 --- a/core/src/main/resources/template/xhtml/styles.css +++ b/core/src/main/resources/template/xhtml/styles.css @@ -34,8 +34,9 @@ .tdCheckboxInput {text-align:left; vertical-align:top;} .tdCheckboxErrorMessage {text-align:left; vertical-align:top;} .tdErrorMessage {text-align:center; vertical-align:top;} -.tdInput {text-align:left;} .formButton {text-align:right;} +.tdInput {text-align:left;} + .align-center{text-align:center;} .align-right{text-align:right;} From dce6d3e110cd37b4ecffc160b2e681d11886b46c Mon Sep 17 00:00:00 2001 From: victorsosa Date: Wed, 25 May 2016 09:23:13 -0400 Subject: [PATCH 10/31] test fix --- .../org/apache/struts2/views/jsp/ui/CheckboxList-1.txt | 2 +- .../org/apache/struts2/views/jsp/ui/CheckboxList-2.txt | 2 +- .../org/apache/struts2/views/jsp/ui/CheckboxList-3.txt | 2 +- .../org/apache/struts2/views/jsp/ui/CheckboxList-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/ComboBox-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/ComboBox-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Component-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Component-3.txt | 2 +- .../org/apache/struts2/views/jsp/ui/DoubleSelect-1.txt | 2 +- .../org/apache/struts2/views/jsp/ui/DoubleSelect-2.txt | 2 +- .../org/apache/struts2/views/jsp/ui/DoubleSelect-3.txt | 2 +- .../org/apache/struts2/views/jsp/ui/DoubleSelect-4.txt | 2 +- .../test/resources/org/apache/struts2/views/jsp/ui/File-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Label-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Label-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Label-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Label-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Label-5.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-5.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-6.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/OptGroup-7.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Password-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-5.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-6.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Radio-7.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-10.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-11.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-12.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-13.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-5.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-6.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-7.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-8.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Select-9.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textarea-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-4.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-7.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-8.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-9.txt | 2 +- .../org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt | 4 ++-- .../apache/struts2/views/jsp/ui/optiontransferselect-1.txt | 2 +- .../apache/struts2/views/jsp/ui/optiontransferselect-2.txt | 2 +- .../apache/struts2/views/jsp/ui/optiontransferselect-3.txt | 2 +- .../apache/struts2/views/jsp/ui/optiontransferselect-4.txt | 2 +- .../apache/struts2/views/jsp/ui/optiontransferselect-5.txt | 2 +- .../apache/struts2/views/jsp/ui/optiontransferselect-6.txt | 2 +- .../apache/struts2/views/jsp/ui/optiontransferselect-7.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/tooltip-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/tooltip-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/tooltip-3.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/tooltip-4.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-1.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-10.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-11.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-2.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-3.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-4.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-5.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-6.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-7.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-8.txt | 2 +- .../org/apache/struts2/views/jsp/ui/updownselecttag-9.txt | 2 +- 81 files changed, 82 insertions(+), 82 deletions(-) diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt index 0458cea2a..3f40324f1 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-1.txt @@ -1,6 +1,6 @@ - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt index abdaa4414..afd930d8e 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-2.txt @@ -1,6 +1,6 @@ - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt index 5fe2bf584..98284f057 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-3.txt @@ -1,6 +1,6 @@ - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt index 3ba9c42d7..7bf890a04 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/CheckboxList-4.txt @@ -1,6 +1,6 @@ - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt index 1c416a598..fc3c1c0a8 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt @@ -1,6 +1,6 @@ - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt index be8fd8fce..d423b3a3c 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt index 3e3642190..2713ceca6 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt index a7905457b..fee900366 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt index 4454ed2f9..61668b22a 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt index cbcde657c..dc0057fdd 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt index 68f689b7b..ade6e348a 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt index 75f5aaf4c..9becafca5 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt @@ -1,6 +1,6 @@ -
+ diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-1.txt index 7701269ab..8394cb502 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-1.txt @@ -8,7 +8,7 @@ onmouseover="domTT_activate(this,event,'content','myTooltip','delay','500','styleClass','StrutsTTClassic')"/> - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-2.txt index 8c7d2fe32..596854e73 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-2.txt @@ -8,7 +8,7 @@ onmouseover="domTT_activate(this,event,'content','myTooltip','delay','500','styleClass','StrutsTTClassic')"/> - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-3.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-3.txt index a8871b6a6..e4885645a 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-3.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-3.txt @@ -8,7 +8,7 @@ onmouseover="domTT_activate(this,event,'content','myTooltip','delay','5000','styleClass','StrutsTTClassic')"/> - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-4.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-4.txt index 36cb71127..f8aad53bd 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-4.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/tooltip-4.txt @@ -8,7 +8,7 @@ title="myTooltip" alt="myTooltip" /> - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt index 1781a6edc..8949d2ad6 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt @@ -1,7 +1,7 @@
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+ - +
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt index 3487b3370..2c62222d3 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt @@ -1,7 +1,7 @@
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
- - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-2.txt index e965d4322..8bdb4b6bf 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-2.txt @@ -3,5 +3,5 @@ - + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-3.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-3.txt index 67d52b247..c35c1ea62 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-3.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/validationstyles-3.txt @@ -3,5 +3,5 @@ - + From e0b13a5b0b5e7820729cba570082fe698dacb7c7 Mon Sep 17 00:00:00 2001 From: victorsosa Date: Wed, 25 May 2016 10:38:37 -0400 Subject: [PATCH 12/31] fix test cases --- .../resources/org/apache/struts2/views/jsp/ui/Textfield-12.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Textfield-13.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-12.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-12.txt index 9a3155d4d..956c89105 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-12.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-12.txt @@ -5,7 +5,7 @@ *: - \ No newline at end of file diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-13.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-13.txt index e5e6e926d..373f0dca7 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-13.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-13.txt @@ -5,7 +5,7 @@ mylabel: - \ No newline at end of file From 0d92fd0ee5d4c23aabe7bf3c2ef1b30ff3e5c00d Mon Sep 17 00:00:00 2001 From: jumiller Date: Thu, 9 Jun 2016 15:39:23 -0600 Subject: [PATCH 13/31] add allowed methods to ActionBuilder --- .../struts2/convention/ConventionUnknownHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java index b7c7acff7..717bcc5b3 100644 --- a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java +++ b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java @@ -106,7 +106,7 @@ public class ConventionUnknownHandler implements UnknownHandler { this.redirectToSlash = Boolean.parseBoolean(redirectToSlash); - allowedMethods = TextParseUtil.commaDelimitedStringToSet("execute,input,back,cancel,browse"); + allowedMethods = TextParseUtil.commaDelimitedStringToSet("execute,input,back,cancel,browse,index"); } public ActionConfig handleUnknownAction(String namespace, String actionName) @@ -219,7 +219,10 @@ public class ConventionUnknownHandler implements UnknownHandler { results.put(Action.SUCCESS, config); return new ActionConfig.Builder(defaultParentPackageName, "execute", ActionSupport.class.getName()). - addInterceptors(interceptors).addResultConfigs(results).build(); + addInterceptors(interceptors). + addResultConfigs(results). + addAllowedMethod(allowedMethods). + build(); } private Result scanResultsByExtension(String ns, String actionName, String pathPrefix, From dd3b80f2be6feb72de808087edcf7914e9d5bb6b Mon Sep 17 00:00:00 2001 From: jumiller Date: Fri, 10 Jun 2016 07:59:27 -0600 Subject: [PATCH 14/31] add GlobalAllowedMethods getter to PackageConfig and modified getActionConfig method in ConventionUnknownHandler to reference it --- .../opensymphony/xwork2/config/entities/PackageConfig.java | 7 +++++++ .../struts2/convention/ConventionUnknownHandler.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java index c0e9477d6..bb34018de 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java @@ -346,6 +346,13 @@ public class PackageConfig extends Located implements Comparable, Serializable, return globalExceptionMappingConfigs; } + /** + * gets the GlobalAllowedMethods local to this package + * + * @return a Set of method names allowed to be executed if strict method invocation is enabled + */ + public Set getGlobalAllowedMethods() { return globalAllowedMethods; } + public boolean isStrictMethodInvocation() { return strictMethodInvocation; } diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java index 717bcc5b3..ace9446dd 100644 --- a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java +++ b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java @@ -221,7 +221,7 @@ public class ConventionUnknownHandler implements UnknownHandler { return new ActionConfig.Builder(defaultParentPackageName, "execute", ActionSupport.class.getName()). addInterceptors(interceptors). addResultConfigs(results). - addAllowedMethod(allowedMethods). + addAllowedMethod(pkg.getGlobalAllowedMethods()). build(); } From 39cc611d7205a6fb44fb18ccf36502bcab5bca23 Mon Sep 17 00:00:00 2001 From: Aleksandr Mashchenko Date: Sat, 11 Jun 2016 20:30:05 +0300 Subject: [PATCH 15/31] WW-4644 - Drops xwork-core from bom --- bom/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index 13098b374..6e3ccabef 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -43,11 +43,6 @@ - - org.apache.struts.xwork - xwork-core - ${struts-version.version} - org.apache.struts struts2-core From e28e5f03a6fd56797fb69d9d2422a39c176a6317 Mon Sep 17 00:00:00 2001 From: Aleksandr Mashchenko Date: Sat, 11 Jun 2016 21:17:01 +0300 Subject: [PATCH 16/31] Fixes WW-4529 and few other typos --- .../xwork2/interceptor/StaticParametersInterceptor.java | 2 +- .../xwork2/validator/DelegatingValidatorContext.java | 2 +- .../java/org/apache/struts2/components/DoubleListUIBean.java | 2 +- .../src/main/java/org/apache/struts2/components/ListUIBean.java | 2 +- core/src/main/java/org/apache/struts2/components/Set.java | 2 +- .../java/org/apache/struts2/factory/StrutsResultFactory.java | 2 +- .../java/org/apache/struts2/views/freemarker/tags/TagModel.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java index 914a2a12e..d3e2df2a2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java +++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java @@ -205,7 +205,7 @@ public class StaticParametersInterceptor extends AbstractInterceptor { /** * Adds the parameters into context's ParameterMap. - * As default, static parameters will not overwrite existing paramaters from other sources. + * As default, static parameters will not overwrite existing parameters from other sources. * If you want the static parameters as successor over already existing parameters, set overwrite to true. * * @param ac The action context diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java b/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java index 0f56055e8..cf6de26ed 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java +++ b/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java @@ -184,7 +184,7 @@ public class DelegatingValidatorContext implements ValidatorContext { } public static TextProvider makeTextProvider(Object object, LocaleProvider localeProvider) { - // the object argument passed through here will most probably be an ActionSupport decendant which does + // the object argument passed through here will most probably be an ActionSupport descendant which does // implements TextProvider. if (object != null && object instanceof DelegatingValidatorContext) { return ((DelegatingValidatorContext) object).getTextProvider(); diff --git a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java index 22e53fae6..5383a5341 100644 --- a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java @@ -36,7 +36,7 @@ import java.util.Map; * *

* Note that the doublelistkey and doublelistvalue attribute will default to "key" and "value" - * respectively only when the doublelist attribute is evaluated to a Map or its decendant. + * respectively only when the doublelist attribute is evaluated to a Map or its descendant. * Other thing else, will result in doublelistkey and doublelistvalue to be null and not used. *

* diff --git a/core/src/main/java/org/apache/struts2/components/ListUIBean.java b/core/src/main/java/org/apache/struts2/components/ListUIBean.java index 94be9d19c..75b29f0d0 100644 --- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java @@ -42,7 +42,7 @@ import java.util.Map; * *

* Note that the listkey and listvalue attribute will default to "key" and "value" - * respectively only when the list attribute is evaluated to a Map or its decendant. + * respectively only when the list attribute is evaluated to a Map or its descendant. * Everything else will result in listkey and listvalue to be null and not used. *

* diff --git a/core/src/main/java/org/apache/struts2/components/Set.java b/core/src/main/java/org/apache/struts2/components/Set.java index 1b3c16852..7e1ca021d 100644 --- a/core/src/main/java/org/apache/struts2/components/Set.java +++ b/core/src/main/java/org/apache/struts2/components/Set.java @@ -42,7 +42,7 @@ import com.opensymphony.xwork2.util.ValueStack; *
  • application - the value will be set in application scope according to servlet spec. using the name as its key
  • *
  • session - the value will be set in session scope according to servlet spec. using the name as key
  • *
  • request - the value will be set in request scope according to servlet spec. using the name as key
  • - *
  • page - the value will be set in page scope according to servlet sepc. using the name as key
  • + *
  • page - the value will be set in page scope according to servlet spec. using the name as key
  • *
  • action - the value will be set in the request scope and Struts' action context using the name as key
  • * * diff --git a/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java b/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java index 90055547b..6088b020f 100644 --- a/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java @@ -13,7 +13,7 @@ import com.opensymphony.xwork2.result.ParamNameAwareResult; import java.util.Map; /** - * Default implementation which uses {@link com.opensymphony.xwork2.result.ParamNameAwareResult} to accept or throwaway parameters + * Default implementation which uses {@link com.opensymphony.xwork2.result.ParamNameAwareResult} to accept or throw away parameters */ public class StrutsResultFactory implements ResultFactory { diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java b/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java index ba7e37dc0..c174edd69 100644 --- a/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java +++ b/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java @@ -78,7 +78,7 @@ public abstract class TagModel implements TemplateTransformModel { Object value = entry.getValue(); if (value != null) { - // the value should ALWAYS be a decendant of TemplateModel + // the value should ALWAYS be a descendant of TemplateModel if (value instanceof TemplateModel) { try { map.put(entry.getKey(), objectWrapper.unwrap((TemplateModel) value)); From 04e5e9dde8bce770ca2780fcb18f18f311c0c7aa Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 12:54:15 +0200 Subject: [PATCH 17/31] Upgrades OGNL to the latest version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 323cf9e56..3e4ebd1d3 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ ${project.version} 4.1.6.RELEASE - 3.1.4 + 3.1.8 3.3 5.0.2 3.0.5 From ce294b48df537a751ead50d3139eaa5f42234be5 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 13:02:03 +0200 Subject: [PATCH 18/31] Drops unneeded method (cherry picked from commit 3f526d630aa56393233500c874293c29abec54ae) --- .../src/main/java/com/opensymphony/xwork2/ActionSupport.java | 4 ---- .../test/java/com/opensymphony/xwork2/ActionSupportTest.java | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java index 1506fade0..62f24df5a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java +++ b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java @@ -156,10 +156,6 @@ public class ActionSupport implements Action, Validateable, ValidationAware, Tex return INPUT; } - public String doDefault() throws Exception { - return SUCCESS; - } - /** * A default implementation that does nothing an returns "success". * diff --git a/core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java b/core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java index 2482ca084..cbbd58bc0 100644 --- a/core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java @@ -64,7 +64,6 @@ public class ActionSupportTest extends XWorkTestCase { } assertEquals(Action.INPUT, as.input()); - assertEquals(Action.SUCCESS, as.doDefault()); assertEquals(Action.SUCCESS, as.execute()); try { as.clone(); @@ -157,7 +156,7 @@ public class ActionSupportTest extends XWorkTestCase { ActionContext.getContext().setLocale(new Locale("da")); MyActionSupport mas = new MyActionSupport(); - assertEquals("santa", mas.doDefault()); + assertEquals("santa", mas.execute()); assertNotNull(mas.getTexts()); assertEquals(false, mas.hasActionMessages()); @@ -331,7 +330,7 @@ public class ActionSupportTest extends XWorkTestCase { private Double val; @Override - public String doDefault() throws Exception { + public String execute() throws Exception { return "santa"; } From 7da4ef39023bb5d86509d65565a04b533e8b4c55 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 13:03:39 +0200 Subject: [PATCH 19/31] Introduces new callMethod() function to be used to execute actions (cherry picked from commit b28b78c062f0bf3c79793a25aab8c9b6c12bce6e) --- .../xwork2/DefaultActionInvocation.java | 2 +- .../opensymphony/xwork2/ognl/OgnlUtil.java | 64 +++++++++++++++++++ .../xwork2/ognl/OgnlUtilTest.java | 15 +++++ 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java index 167159cf2..639bf95cb 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java +++ b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java @@ -419,7 +419,7 @@ public class DefaultActionInvocation implements ActionInvocation { Object methodResult; try { - methodResult = ognlUtil.getValue(methodName + "()", getStack().getContext(), action); + methodResult = ognlUtil.callMethod(methodName + "()", getStack().getContext(), action); } catch (MethodFailedException e) { // if reason is missing method, try checking UnknownHandlers if (e.getReason() instanceof NoSuchMethodException) { 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 562b6fc14..86e9c5354 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -289,6 +289,9 @@ public class OgnlUtil { if (isEvalExpression(tree, context)) { throw new OgnlException("Eval expression/chained expressions cannot be used as parameter name"); } + if (isArithmeticExpression(tree, context)) { + throw new OgnlException("Arithmetic expressions cannot be used as parameter name"); + } Ognl.setValue(tree, context, root, value); return null; } @@ -308,6 +311,32 @@ public class OgnlUtil { return false; } + private boolean isArithmeticExpression(Object tree, Map context) throws OgnlException { + if (tree instanceof SimpleNode) { + SimpleNode node = (SimpleNode) tree; + OgnlContext ognlContext = null; + + if (context!=null && context instanceof OgnlContext) { + ognlContext = (OgnlContext) context; + } + return node.isOperation(ognlContext); + } + return false; + } + + private boolean isSimpleMethod(Object tree, Map context) throws OgnlException { + if (tree instanceof SimpleNode) { + SimpleNode node = (SimpleNode) tree; + OgnlContext ognlContext = null; + + if (context!=null && context instanceof OgnlContext) { + ognlContext = (OgnlContext) context; + } + return node.isSimpleMethod(ognlContext) && !node.isChain(ognlContext); + } + return false; + } + public Object getValue(final String name, final Map context, final Object root) throws OgnlException { return compileAndExecute(name, context, new OgnlTask() { public Object execute(Object tree) throws OgnlException { @@ -316,6 +345,14 @@ public class OgnlUtil { }); } + public Object callMethod(final String name, final Map context, final Object root) throws OgnlException { + return compileAndExecuteMethod(name, context, new OgnlTask() { + public Object execute(Object tree) throws OgnlException { + return Ognl.getValue(tree, context, root); + } + }); + } + public Object getValue(final String name, final Map context, final Object root, final Class resultType) throws OgnlException { return compileAndExecute(name, context, new OgnlTask() { public Object execute(Object tree) throws OgnlException { @@ -350,6 +387,27 @@ public class OgnlUtil { return exec; } + private Object compileAndExecuteMethod(String expression, Map context, OgnlTask task) throws OgnlException { + Object tree; + if (enableExpressionCache) { + tree = expressions.get(expression); + if (tree == null) { + tree = Ognl.parseExpression(expression); + checkSimpleMethod(tree, context); + } + } else { + tree = Ognl.parseExpression(expression); + checkSimpleMethod(tree, context); + } + + final T exec = task.execute(tree); + // if cache is enabled and it's a valid expression, puts it in + if(enableExpressionCache) { + expressions.putIfAbsent(expression, tree); + } + return exec; + } + public Object compile(String expression, Map context) throws OgnlException { return compileAndExecute(expression,context,new OgnlTask() { public Object execute(Object tree) throws OgnlException { @@ -364,6 +422,12 @@ public class OgnlUtil { } } + private void checkSimpleMethod(Object tree, Map context) throws OgnlException { + if (!isSimpleMethod(tree, context)) { + throw new OgnlException("It isn't a simple method which can be called!"); + } + } + /** * Copies the properties in the object "from" and sets them in the object "to" * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none diff --git a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java index 339d6035f..4fdf742a0 100644 --- a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java @@ -759,6 +759,21 @@ public class OgnlUtilTest extends XWorkTestCase { assertEquals(expected.getMessage(), "Eval expressions/chained expressions have been disabled!"); } + public void testCallMethod() throws Exception { + Foo foo = new Foo(); + + Exception expected = null; + try { + ognlUtil.callMethod("#booScope=@myclass@DEFAULT_SCOPE,#bootScope.init()", ognlUtil.createDefaultContext(foo), foo); + fail(); + } catch (OgnlException e) { + expected = e; + } + assertNotNull(expected); + assertSame(OgnlException.class, expected.getClass()); + assertEquals(expected.getMessage(), "It isn't a simple method which can be called!"); + } + public static class Email { String address; From e60119436a00a3ac177439c8e17d9743dc16a480 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 13:10:49 +0200 Subject: [PATCH 20/31] WW-4632 Uses proper DTD version --- apps/portlet/src/main/resources/struts-edit.xml | 4 ++-- apps/portlet/src/main/resources/struts-eventing.xml | 4 ++-- apps/portlet/src/main/resources/struts-help.xml | 4 ++-- apps/portlet/src/main/resources/struts-tiles.xml | 4 ++-- apps/portlet/src/main/resources/struts-view.xml | 4 ++-- apps/portlet/src/main/resources/struts.xml | 4 ++-- apps/showcase/src/main/resources/struts-actionchaining.xml | 4 ++-- apps/showcase/src/main/resources/struts-conversion.xml | 4 ++-- apps/showcase/src/main/resources/struts-filedownload.xml | 4 ++-- apps/showcase/src/main/resources/struts-fileupload.xml | 4 ++-- apps/showcase/src/main/resources/struts-freemarker.xml | 4 ++-- apps/showcase/src/main/resources/struts-hangman.xml | 4 ++-- apps/showcase/src/main/resources/struts-interactive.xml | 4 ++-- apps/showcase/src/main/resources/struts-model-driven.xml | 4 ++-- apps/showcase/src/main/resources/struts-person.xml | 4 ++-- apps/showcase/src/main/resources/struts-tags-non-ui.xml | 4 ++-- apps/showcase/src/main/resources/struts-tags-ui.xml | 4 ++-- apps/showcase/src/main/resources/struts-tags.xml | 4 ++-- apps/showcase/src/main/resources/struts-tiles.xml | 4 ++-- apps/showcase/src/main/resources/struts-token.xml | 4 ++-- apps/showcase/src/main/resources/struts-validation.xml | 4 ++-- apps/showcase/src/main/resources/struts-wait.xml | 4 ++-- apps/showcase/src/main/resources/struts-xslt.xml | 4 ++-- apps/showcase/src/main/resources/struts.xml | 4 ++-- .../archetype-resources/src/main/resources/struts.xml | 4 ++-- .../archetype-resources/src/main/resources/example.xml | 4 ++-- .../archetype-resources/src/main/resources/struts.xml | 4 ++-- .../archetype-resources/src/main/resources/struts.xml | 4 ++-- .../archetype-resources/src/main/resources/struts.xml | 4 ++-- .../archetype-resources/src/main/resources/struts-plugin.xml | 4 ++-- .../archetype-resources/src/main/resources/struts.xml | 4 ++-- .../archetype-resources/src/main/resources/struts.xml | 4 ++-- .../test/resources/struts-object-factory-result-builder.xml | 4 ++-- plugins/bean-validation/src/main/resources/struts-plugin.xml | 4 ++-- plugins/cdi/src/main/resources/struts-plugin.xml | 4 ++-- plugins/config-browser/src/main/resources/struts-plugin.xml | 4 ++-- plugins/convention/src/main/resources/struts-plugin.xml | 4 ++-- plugins/embeddedjsp/src/main/resources/struts-plugin.xml | 4 ++-- plugins/gxp/src/main/resources/struts-plugin.xml | 4 ++-- plugins/jasperreports/src/main/resources/struts-plugin.xml | 4 ++-- plugins/java8-support/src/main/resources/struts-plugin.xml | 4 ++-- plugins/javatemplates/src/main/resources/struts-plugin.xml | 4 ++-- plugins/jfreechart/src/main/resources/struts-plugin.xml | 4 ++-- plugins/json/src/main/resources/struts-plugin.xml | 4 ++-- .../src/test/resources/struts-convention-configuration.xml | 4 ++-- plugins/osgi/src/main/resources/struts-plugin.xml | 4 ++-- plugins/oval/src/main/resources/struts-plugin.xml | 4 ++-- plugins/pell-multipart/src/main/resources/struts-plugin.xml | 4 ++-- plugins/plexus/src/main/resources/struts-plugin.xml | 4 ++-- plugins/portlet-tiles/src/main/resources/struts-plugin.xml | 4 ++-- plugins/portlet/src/main/resources/struts-plugin.xml | 4 ++-- plugins/portlet/src/test/resources/struts.xml | 4 ++-- plugins/sitemesh/src/main/resources/struts-plugin.xml | 4 ++-- plugins/spring/src/main/resources/struts-plugin.xml | 4 ++-- plugins/tiles/src/main/resources/struts-plugin.xml | 4 ++-- 55 files changed, 110 insertions(+), 110 deletions(-) diff --git a/apps/portlet/src/main/resources/struts-edit.xml b/apps/portlet/src/main/resources/struts-edit.xml index 55161f8f6..a31691c29 100644 --- a/apps/portlet/src/main/resources/struts-edit.xml +++ b/apps/portlet/src/main/resources/struts-edit.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/portlet/src/main/resources/struts-help.xml b/apps/portlet/src/main/resources/struts-help.xml index bc047aa24..451aa7de4 100644 --- a/apps/portlet/src/main/resources/struts-help.xml +++ b/apps/portlet/src/main/resources/struts-help.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/portlet/src/main/resources/struts-view.xml b/apps/portlet/src/main/resources/struts-view.xml index 87ce94f2e..e492af1ef 100644 --- a/apps/portlet/src/main/resources/struts-view.xml +++ b/apps/portlet/src/main/resources/struts-view.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-actionchaining.xml b/apps/showcase/src/main/resources/struts-actionchaining.xml index 94d8b2857..ab0f2ea5b 100644 --- a/apps/showcase/src/main/resources/struts-actionchaining.xml +++ b/apps/showcase/src/main/resources/struts-actionchaining.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-conversion.xml b/apps/showcase/src/main/resources/struts-conversion.xml index cfbac4abf..e597b25c0 100644 --- a/apps/showcase/src/main/resources/struts-conversion.xml +++ b/apps/showcase/src/main/resources/struts-conversion.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-filedownload.xml b/apps/showcase/src/main/resources/struts-filedownload.xml index f05b4a42c..de50f5abd 100644 --- a/apps/showcase/src/main/resources/struts-filedownload.xml +++ b/apps/showcase/src/main/resources/struts-filedownload.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-fileupload.xml b/apps/showcase/src/main/resources/struts-fileupload.xml index 5a81f614d..d9d0cfcac 100644 --- a/apps/showcase/src/main/resources/struts-fileupload.xml +++ b/apps/showcase/src/main/resources/struts-fileupload.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-freemarker.xml b/apps/showcase/src/main/resources/struts-freemarker.xml index 8c70421cf..9a6c9017f 100644 --- a/apps/showcase/src/main/resources/struts-freemarker.xml +++ b/apps/showcase/src/main/resources/struts-freemarker.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-hangman.xml b/apps/showcase/src/main/resources/struts-hangman.xml index 69abdbf7a..b8540630a 100644 --- a/apps/showcase/src/main/resources/struts-hangman.xml +++ b/apps/showcase/src/main/resources/struts-hangman.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-interactive.xml b/apps/showcase/src/main/resources/struts-interactive.xml index 24b28b758..7c50d3753 100644 --- a/apps/showcase/src/main/resources/struts-interactive.xml +++ b/apps/showcase/src/main/resources/struts-interactive.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-model-driven.xml b/apps/showcase/src/main/resources/struts-model-driven.xml index dc9b839a3..56e4bdfbe 100644 --- a/apps/showcase/src/main/resources/struts-model-driven.xml +++ b/apps/showcase/src/main/resources/struts-model-driven.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-person.xml b/apps/showcase/src/main/resources/struts-person.xml index 28a7642a0..e880e5b27 100644 --- a/apps/showcase/src/main/resources/struts-person.xml +++ b/apps/showcase/src/main/resources/struts-person.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tags-non-ui.xml b/apps/showcase/src/main/resources/struts-tags-non-ui.xml index 9722b52e8..9ecf1528b 100644 --- a/apps/showcase/src/main/resources/struts-tags-non-ui.xml +++ b/apps/showcase/src/main/resources/struts-tags-non-ui.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tags-ui.xml b/apps/showcase/src/main/resources/struts-tags-ui.xml index cc779e575..659e97934 100644 --- a/apps/showcase/src/main/resources/struts-tags-ui.xml +++ b/apps/showcase/src/main/resources/struts-tags-ui.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tags.xml b/apps/showcase/src/main/resources/struts-tags.xml index cd1a2b2b6..8485a64f0 100644 --- a/apps/showcase/src/main/resources/struts-tags.xml +++ b/apps/showcase/src/main/resources/struts-tags.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tiles.xml b/apps/showcase/src/main/resources/struts-tiles.xml index 9fbe0258b..caa0727f0 100644 --- a/apps/showcase/src/main/resources/struts-tiles.xml +++ b/apps/showcase/src/main/resources/struts-tiles.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-token.xml b/apps/showcase/src/main/resources/struts-token.xml index d43435bd3..8b545df04 100644 --- a/apps/showcase/src/main/resources/struts-token.xml +++ b/apps/showcase/src/main/resources/struts-token.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-validation.xml b/apps/showcase/src/main/resources/struts-validation.xml index 40b989971..63fcd7970 100755 --- a/apps/showcase/src/main/resources/struts-validation.xml +++ b/apps/showcase/src/main/resources/struts-validation.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-wait.xml b/apps/showcase/src/main/resources/struts-wait.xml index 0e09f4966..1a5556d73 100644 --- a/apps/showcase/src/main/resources/struts-wait.xml +++ b/apps/showcase/src/main/resources/struts-wait.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-xslt.xml b/apps/showcase/src/main/resources/struts-xslt.xml index 7d17720ae..d3a040bb7 100644 --- a/apps/showcase/src/main/resources/struts-xslt.xml +++ b/apps/showcase/src/main/resources/struts-xslt.xml @@ -1,8 +1,8 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts.xml b/apps/showcase/src/main/resources/struts.xml index dcf9a916f..11ca7246a 100644 --- a/apps/showcase/src/main/resources/struts.xml +++ b/apps/showcase/src/main/resources/struts.xml @@ -1,8 +1,8 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml index 0c7352322..d11f2d899 100644 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml +++ b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/struts.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml b/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml index 7de329f94..906b23eac 100644 --- a/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml +++ b/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/bean-validation/src/main/resources/struts-plugin.xml b/plugins/bean-validation/src/main/resources/struts-plugin.xml index 1ef394950..c7b9d2025 100644 --- a/plugins/bean-validation/src/main/resources/struts-plugin.xml +++ b/plugins/bean-validation/src/main/resources/struts-plugin.xml @@ -23,8 +23,8 @@ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/cdi/src/main/resources/struts-plugin.xml b/plugins/cdi/src/main/resources/struts-plugin.xml index 364440820..bbbd5a9ab 100644 --- a/plugins/cdi/src/main/resources/struts-plugin.xml +++ b/plugins/cdi/src/main/resources/struts-plugin.xml @@ -20,8 +20,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/config-browser/src/main/resources/struts-plugin.xml b/plugins/config-browser/src/main/resources/struts-plugin.xml index ccdef48bf..c1115e43c 100644 --- a/plugins/config-browser/src/main/resources/struts-plugin.xml +++ b/plugins/config-browser/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/convention/src/main/resources/struts-plugin.xml b/plugins/convention/src/main/resources/struts-plugin.xml index 55dcc2b6f..e710f00ca 100644 --- a/plugins/convention/src/main/resources/struts-plugin.xml +++ b/plugins/convention/src/main/resources/struts-plugin.xml @@ -23,8 +23,8 @@ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/embeddedjsp/src/main/resources/struts-plugin.xml b/plugins/embeddedjsp/src/main/resources/struts-plugin.xml index 22d6d80d4..fc5b993d1 100644 --- a/plugins/embeddedjsp/src/main/resources/struts-plugin.xml +++ b/plugins/embeddedjsp/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/gxp/src/main/resources/struts-plugin.xml b/plugins/gxp/src/main/resources/struts-plugin.xml index 8cd40f7ad..478c92682 100644 --- a/plugins/gxp/src/main/resources/struts-plugin.xml +++ b/plugins/gxp/src/main/resources/struts-plugin.xml @@ -1,8 +1,8 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/jasperreports/src/main/resources/struts-plugin.xml b/plugins/jasperreports/src/main/resources/struts-plugin.xml index bf574964c..b5b35b536 100644 --- a/plugins/jasperreports/src/main/resources/struts-plugin.xml +++ b/plugins/jasperreports/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/java8-support/src/main/resources/struts-plugin.xml b/plugins/java8-support/src/main/resources/struts-plugin.xml index c765cf817..e25cd8308 100644 --- a/plugins/java8-support/src/main/resources/struts-plugin.xml +++ b/plugins/java8-support/src/main/resources/struts-plugin.xml @@ -23,8 +23,8 @@ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/javatemplates/src/main/resources/struts-plugin.xml b/plugins/javatemplates/src/main/resources/struts-plugin.xml index 5932bf0d9..6ea5110b6 100644 --- a/plugins/javatemplates/src/main/resources/struts-plugin.xml +++ b/plugins/javatemplates/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/jfreechart/src/main/resources/struts-plugin.xml b/plugins/jfreechart/src/main/resources/struts-plugin.xml index a3997c044..e686db0b5 100644 --- a/plugins/jfreechart/src/main/resources/struts-plugin.xml +++ b/plugins/jfreechart/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/json/src/main/resources/struts-plugin.xml b/plugins/json/src/main/resources/struts-plugin.xml index 58c06c789..e6aa1de31 100644 --- a/plugins/json/src/main/resources/struts-plugin.xml +++ b/plugins/json/src/main/resources/struts-plugin.xml @@ -1,8 +1,8 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/junit/src/test/resources/struts-convention-configuration.xml b/plugins/junit/src/test/resources/struts-convention-configuration.xml index 77525f084..9d9dd218e 100644 --- a/plugins/junit/src/test/resources/struts-convention-configuration.xml +++ b/plugins/junit/src/test/resources/struts-convention-configuration.xml @@ -23,8 +23,8 @@ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/osgi/src/main/resources/struts-plugin.xml b/plugins/osgi/src/main/resources/struts-plugin.xml index 6c1f3c592..302c7b45b 100644 --- a/plugins/osgi/src/main/resources/struts-plugin.xml +++ b/plugins/osgi/src/main/resources/struts-plugin.xml @@ -1,8 +1,8 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/oval/src/main/resources/struts-plugin.xml b/plugins/oval/src/main/resources/struts-plugin.xml index 259440ee2..75957636e 100644 --- a/plugins/oval/src/main/resources/struts-plugin.xml +++ b/plugins/oval/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/pell-multipart/src/main/resources/struts-plugin.xml b/plugins/pell-multipart/src/main/resources/struts-plugin.xml index 1ca6a776f..424fbd2a1 100644 --- a/plugins/pell-multipart/src/main/resources/struts-plugin.xml +++ b/plugins/pell-multipart/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/plexus/src/main/resources/struts-plugin.xml b/plugins/plexus/src/main/resources/struts-plugin.xml index dc32d0e63..b345d28a0 100644 --- a/plugins/plexus/src/main/resources/struts-plugin.xml +++ b/plugins/plexus/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/portlet-tiles/src/main/resources/struts-plugin.xml b/plugins/portlet-tiles/src/main/resources/struts-plugin.xml index 425a21b51..f044e6b62 100644 --- a/plugins/portlet-tiles/src/main/resources/struts-plugin.xml +++ b/plugins/portlet-tiles/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/portlet/src/main/resources/struts-plugin.xml b/plugins/portlet/src/main/resources/struts-plugin.xml index 478374bfc..2d95d904b 100644 --- a/plugins/portlet/src/main/resources/struts-plugin.xml +++ b/plugins/portlet/src/main/resources/struts-plugin.xml @@ -23,8 +23,8 @@ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/portlet/src/test/resources/struts.xml b/plugins/portlet/src/test/resources/struts.xml index 4b93f295c..15d7a4a41 100644 --- a/plugins/portlet/src/test/resources/struts.xml +++ b/plugins/portlet/src/test/resources/struts.xml @@ -1,7 +1,7 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/sitemesh/src/main/resources/struts-plugin.xml b/plugins/sitemesh/src/main/resources/struts-plugin.xml index c12230ecf..7966f2719 100644 --- a/plugins/sitemesh/src/main/resources/struts-plugin.xml +++ b/plugins/sitemesh/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/spring/src/main/resources/struts-plugin.xml b/plugins/spring/src/main/resources/struts-plugin.xml index 2e9b1b16c..eb507726c 100644 --- a/plugins/spring/src/main/resources/struts-plugin.xml +++ b/plugins/spring/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/plugins/tiles/src/main/resources/struts-plugin.xml b/plugins/tiles/src/main/resources/struts-plugin.xml index 0018a5f37..234e82163 100644 --- a/plugins/tiles/src/main/resources/struts-plugin.xml +++ b/plugins/tiles/src/main/resources/struts-plugin.xml @@ -22,8 +22,8 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" + "http://struts.apache.org/dtds/struts-2.5.dtd"> From ca256a74e98861a70c446b309dbe8ca1669dbba6 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 15:22:45 +0200 Subject: [PATCH 21/31] Inlines constants and drops class --- .../opensymphony/xwork2/XWorkMessages.java | 31 ------------------- .../conversion/impl/XWorkConverter.java | 2 +- .../xwork2/util/LocalizedTextUtilTest.java | 13 +++----- 3 files changed, 6 insertions(+), 40 deletions(-) delete mode 100644 core/src/main/java/com/opensymphony/xwork2/XWorkMessages.java diff --git a/core/src/main/java/com/opensymphony/xwork2/XWorkMessages.java b/core/src/main/java/com/opensymphony/xwork2/XWorkMessages.java deleted file mode 100644 index d187acc51..000000000 --- a/core/src/main/java/com/opensymphony/xwork2/XWorkMessages.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2002-2006,2009 The Apache Software Foundation. - * - * Licensed 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 com.opensymphony.xwork2; - - -/** - * Contains constants for some default XWork messages. - * - * @author Jason Carreira - */ -public interface XWorkMessages { - - public static final String ACTION_EXECUTION_ERROR = "xwork.error.action.execution"; - public static final String MISSING_ACTION_EXCEPTION = "xwork.exception.missing-action"; - public static final String MISSING_PACKAGE_ACTION_EXCEPTION = "xwork.exception.missing-package-action"; - public static final String DEFAULT_INVALID_FIELDVALUE = "xwork.default.invalid.fieldvalue"; - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java index c946d70af..9dfcd4d7a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java @@ -194,7 +194,7 @@ public class XWorkConverter extends DefaultTypeConverter { } public static String getConversionErrorMessage(String propertyName, ValueStack stack) { - String defaultMessage = LocalizedTextUtil.findDefaultText(XWorkMessages.DEFAULT_INVALID_FIELDVALUE, + String defaultMessage = LocalizedTextUtil.findDefaultText("xwork.default.invalid.fieldvalue", ActionContext.getContext().getLocale(), new Object[]{ propertyName diff --git a/core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java b/core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java index 12058520e..f09bc9b89 100644 --- a/core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java @@ -20,10 +20,7 @@ import com.opensymphony.xwork2.*; import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider; import com.opensymphony.xwork2.test.ModelDrivenAction2; import com.opensymphony.xwork2.test.TestBean2; -import org.apache.struts2.util.DateFormatter; -import org.springframework.format.annotation.DateTimeFormat; -import javax.swing.text.Style; import java.text.DateFormat; import java.text.ParseException; import java.util.Date; @@ -134,17 +131,17 @@ public class LocalizedTextUtilTest extends XWorkTestCase { } public void testDefaultMessage() throws Exception { - String message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault()); + String message = LocalizedTextUtil.findDefaultText("xwork.error.action.execution", Locale.getDefault()); assertEquals("Error during Action invocation", message); } public void testDefaultMessageOverride() throws Exception { - String message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault()); + String message = LocalizedTextUtil.findDefaultText("xwork.error.action.execution", Locale.getDefault()); assertEquals("Error during Action invocation", message); LocalizedTextUtil.addDefaultResourceBundle("com/opensymphony/xwork2/test"); - message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault()); + message = LocalizedTextUtil.findDefaultText("xwork.error.action.execution", Locale.getDefault()); assertEquals("Testing resource bundle override", message); } @@ -187,12 +184,12 @@ public class LocalizedTextUtilTest extends XWorkTestCase { } public void testParameterizedDefaultMessage() throws Exception { - String message = LocalizedTextUtil.findDefaultText(XWorkMessages.MISSING_ACTION_EXCEPTION, Locale.getDefault(), new String[]{"AddUser"}); + String message = LocalizedTextUtil.findDefaultText("xwork.exception.missing-action", Locale.getDefault(), new String[]{"AddUser"}); assertEquals("There is no Action mapped for action name AddUser.", message); } public void testParameterizedDefaultMessageWithPackage() throws Exception { - String message = LocalizedTextUtil.findDefaultText(XWorkMessages.MISSING_PACKAGE_ACTION_EXCEPTION, Locale.getDefault(), new String[]{"blah", "AddUser"}); + String message = LocalizedTextUtil.findDefaultText("xwork.exception.missing-package-action", Locale.getDefault(), new String[]{"blah", "AddUser"}); assertEquals("There is no Action mapped for namespace blah and action name AddUser.", message); } From 1afb48aa765a96a9d183bb4ac249bfcc8f7daf3a Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 15:41:28 +0200 Subject: [PATCH 22/31] WW-4640 Adds more informative message when method is not allowed --- .../xwork2/DefaultActionProxy.java | 14 ++++++++--- .../xwork2/xwork-messages.properties | 2 +- .../xwork2/DefaultActionProxyTest.java | 24 +++++++++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 core/src/test/java/com/opensymphony/xwork2/DefaultActionProxyTest.java diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java index 72c6e9e02..2d8bc38ae 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java +++ b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java @@ -197,22 +197,30 @@ public class DefaultActionProxy implements ActionProxy, Serializable { if (config.isAllowedMethod(method)) { invocation.init(this); } else { - throw new ConfigurationException("This method: " + method + " for action " + actionName + " is not allowed!"); + throw new ConfigurationException(prepareNotAllowedErrorMessage()); } } finally { UtilTimerStack.pop(profileKey); } } + protected String prepareNotAllowedErrorMessage() { + return LocalizedTextUtil.findDefaultText( + "struts.exception.method-not-allowed", + Locale.getDefault(), + new String[]{method, actionName} + ); + } + protected String getErrorMessage() { if ((namespace != null) && (namespace.trim().length() > 0)) { return LocalizedTextUtil.findDefaultText( - XWorkMessages.MISSING_PACKAGE_ACTION_EXCEPTION, + "xwork.exception.missing-package-action", Locale.getDefault(), new String[]{namespace, actionName}); } else { return LocalizedTextUtil.findDefaultText( - XWorkMessages.MISSING_ACTION_EXCEPTION, + "xwork.exception.missing-action", Locale.getDefault(), new String[]{actionName}); } diff --git a/core/src/main/resources/com/opensymphony/xwork2/xwork-messages.properties b/core/src/main/resources/com/opensymphony/xwork2/xwork-messages.properties index 606887998..94781f5d1 100644 --- a/core/src/main/resources/com/opensymphony/xwork2/xwork-messages.properties +++ b/core/src/main/resources/com/opensymphony/xwork2/xwork-messages.properties @@ -7,4 +7,4 @@ xwork.error.action.execution=Error during Action invocation xwork.exception.missing-action=There is no Action mapped for action name {0}. xwork.exception.missing-package-action=There is no Action mapped for namespace {0} and action name {1}. xwork.default.invalid.fieldvalue=Invalid field value for field "{0}". - +struts.exception.method-not-allowed=Method {0} for action {1} is not allowed! diff --git a/core/src/test/java/com/opensymphony/xwork2/DefaultActionProxyTest.java b/core/src/test/java/com/opensymphony/xwork2/DefaultActionProxyTest.java new file mode 100644 index 000000000..17d7c68eb --- /dev/null +++ b/core/src/test/java/com/opensymphony/xwork2/DefaultActionProxyTest.java @@ -0,0 +1,24 @@ +package com.opensymphony.xwork2; + +import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider; +import com.opensymphony.xwork2.mock.MockActionInvocation; +import org.apache.struts2.StrutsInternalTestCase; +import org.junit.Test; + +public class DefaultActionProxyTest extends StrutsInternalTestCase { + + @Test + public void testThorwExceptionOnNotAllowedMethod() throws Exception { + final String filename = "com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml"; + loadConfigurationProviders(new XmlConfigurationProvider(filename)); + DefaultActionProxy dap = new DefaultActionProxy(new MockActionInvocation(), "strict", "Default", "notAllowed", true, true); + container.inject(dap); + + try { + dap.prepare(); + fail("Must throw exception!"); + } catch (Exception e) { + assertEquals(e.getMessage(), "Method notAllowed for action Default is not allowed!"); + } + } +} \ No newline at end of file From 7621c2bc92e46341caa245544e09d9d2a604f51c Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 12 Jun 2016 19:40:27 +0200 Subject: [PATCH 23/31] WW-4643 Makes set unmodifiable --- .../com/opensymphony/xwork2/config/entities/PackageConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java index bb34018de..95f6f6633 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java @@ -351,7 +351,7 @@ public class PackageConfig extends Located implements Comparable, Serializable, * * @return a Set of method names allowed to be executed if strict method invocation is enabled */ - public Set getGlobalAllowedMethods() { return globalAllowedMethods; } + public Set getGlobalAllowedMethods() { return Collections.unmodifiableSet(globalAllowedMethods); } public boolean isStrictMethodInvocation() { return strictMethodInvocation; From a0fdca138feec2c2e94eb75ca1f8b76678b4d152 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Tue, 14 Jun 2016 06:53:36 +0200 Subject: [PATCH 24/31] Improves validation RegEx --- .../opensymphony/xwork2/validator/validators/URLValidator.java | 2 +- .../com/opensymphony/xwork2/validator/URLValidatorTest.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java b/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java index f49d91468..fd678a70b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java +++ b/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java @@ -81,7 +81,7 @@ public class URLValidator extends FieldValidatorSupport { "|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}" + "(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])" + ")(:\\d+)?" + - ")(((\\/+([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*" + + ")(((\\/{0,1}([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*" + "(\\?([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)" + "?)?)?" + "(#([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?" + diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java b/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java index 2895d801c..77223ebed 100644 --- a/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java @@ -138,6 +138,7 @@ public class URLValidatorTest extends XWorkTestCase { assertFalse(pattern.matcher("").matches()); assertFalse(pattern.matcher(" ").matches()); assertFalse(pattern.matcher("no url").matches()); + assertFalse(pattern.matcher("http://example.com////////////////////////////////////////////////////////////////////////////////////??").matches()); assertTrue(pattern.matcher("http://www.opensymphony.com").matches()); assertTrue(pattern.matcher("https://www.opensymphony.com").matches()); From e8aa825f21fc951418f0cfa770d32762a4a83664 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Tue, 14 Jun 2016 08:07:24 +0200 Subject: [PATCH 25/31] [maven-release-plugin] prepare release STRUTS_2_5_1 --- apps/pom.xml | 2 +- apps/portlet/pom.xml | 2 +- apps/rest-showcase/pom.xml | 4 ++-- apps/showcase/pom.xml | 2 +- archetypes/pom.xml | 2 +- archetypes/struts2-archetype-angularjs/pom.xml | 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 | 8 ++++++-- bundles/admin/pom.xml | 2 +- bundles/demo/pom.xml | 2 +- bundles/pom.xml | 2 +- core/pom.xml | 2 +- plugins/bean-validation/pom.xml | 2 +- plugins/cdi/pom.xml | 2 +- plugins/config-browser/pom.xml | 2 +- plugins/convention/pom.xml | 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 +- plugins/jfreechart/pom.xml | 2 +- plugins/json/pom.xml | 2 +- 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 +- 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 +- pom.xml | 4 ++-- 45 files changed, 52 insertions(+), 48 deletions(-) diff --git a/apps/pom.xml b/apps/pom.xml index ab871b01e..ba7419ee1 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 struts2-apps pom diff --git a/apps/portlet/pom.xml b/apps/portlet/pom.xml index dbed8171c..acd8f8975 100644 --- a/apps/portlet/pom.xml +++ b/apps/portlet/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-apps - 2.5.1-SNAPSHOT + 2.5.1 struts2-portlet diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index 6e7e0c02e..cc6eee8cd 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -26,12 +26,12 @@ org.apache.struts struts2-apps - 2.5.1-SNAPSHOT + 2.5.1 struts2-rest-showcase war - 2.5.1-SNAPSHOT + 2.5.1 Struts 2 Rest Showcase Webapp Struts 2 Rest Showcase Example diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 53d9a93a4..70a6c8e4b 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-apps - 2.5.1-SNAPSHOT + 2.5.1 struts2-showcase diff --git a/archetypes/pom.xml b/archetypes/pom.xml index a24531a6c..e08ff1a4a 100644 --- a/archetypes/pom.xml +++ b/archetypes/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 struts2-archetypes diff --git a/archetypes/struts2-archetype-angularjs/pom.xml b/archetypes/struts2-archetype-angularjs/pom.xml index 9db220aa3..371282914 100644 --- a/archetypes/struts2-archetype-angularjs/pom.xml +++ b/archetypes/struts2-archetype-angularjs/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/archetypes/struts2-archetype-blank/pom.xml b/archetypes/struts2-archetype-blank/pom.xml index 9a9260c22..82dc4b611 100644 --- a/archetypes/struts2-archetype-blank/pom.xml +++ b/archetypes/struts2-archetype-blank/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/archetypes/struts2-archetype-convention/pom.xml b/archetypes/struts2-archetype-convention/pom.xml index e308ac125..b84ba7db2 100644 --- a/archetypes/struts2-archetype-convention/pom.xml +++ b/archetypes/struts2-archetype-convention/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/archetypes/struts2-archetype-dbportlet/pom.xml b/archetypes/struts2-archetype-dbportlet/pom.xml index cb7d22822..cbc4a92bf 100644 --- a/archetypes/struts2-archetype-dbportlet/pom.xml +++ b/archetypes/struts2-archetype-dbportlet/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/archetypes/struts2-archetype-plugin/pom.xml b/archetypes/struts2-archetype-plugin/pom.xml index e954f1f5a..d85024913 100644 --- a/archetypes/struts2-archetype-plugin/pom.xml +++ b/archetypes/struts2-archetype-plugin/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/archetypes/struts2-archetype-portlet/pom.xml b/archetypes/struts2-archetype-portlet/pom.xml index d0b2cc3ed..3040179c5 100644 --- a/archetypes/struts2-archetype-portlet/pom.xml +++ b/archetypes/struts2-archetype-portlet/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/archetypes/struts2-archetype-starter/pom.xml b/archetypes/struts2-archetype-starter/pom.xml index 8c8583913..87b58d84f 100644 --- a/archetypes/struts2-archetype-starter/pom.xml +++ b/archetypes/struts2-archetype-starter/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-archetypes - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/assembly/pom.xml b/assembly/pom.xml index 9f445b44f..65c9bbf38 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 struts2-assembly diff --git a/bom/pom.xml b/bom/pom.xml index 6e3ccabef..2d1d53a8c 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -10,7 +10,7 @@ struts2-bom - 2.5.1-SNAPSHOT + 2.5.1 pom Struts 2 Bill of Materials @@ -25,7 +25,7 @@ - 2.5.1-SNAPSHOT + 2.5.1 @@ -170,4 +170,8 @@ + + + STRUTS_2_5_1 + diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml index a7c9e1dcf..bfef28177 100644 --- a/bundles/admin/pom.xml +++ b/bundles/admin/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-osgi-bundles - 2.5.1-SNAPSHOT + 2.5.1 struts2-osgi-admin-bundle diff --git a/bundles/demo/pom.xml b/bundles/demo/pom.xml index bc3ee9ccc..77af92e67 100644 --- a/bundles/demo/pom.xml +++ b/bundles/demo/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-osgi-bundles - 2.5.1-SNAPSHOT + 2.5.1 struts2-osgi-demo-bundle diff --git a/bundles/pom.xml b/bundles/pom.xml index 8937c7bfa..0e3bd8297 100755 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 struts2-osgi-bundles diff --git a/core/pom.xml b/core/pom.xml index 9ce0fcda1..e6f694f6d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 struts2-core jar diff --git a/plugins/bean-validation/pom.xml b/plugins/bean-validation/pom.xml index 235cb327a..20261942b 100644 --- a/plugins/bean-validation/pom.xml +++ b/plugins/bean-validation/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 4.0.0 diff --git a/plugins/cdi/pom.xml b/plugins/cdi/pom.xml index d508ea464..4b8012bb3 100644 --- a/plugins/cdi/pom.xml +++ b/plugins/cdi/pom.xml @@ -25,7 +25,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-cdi-plugin diff --git a/plugins/config-browser/pom.xml b/plugins/config-browser/pom.xml index 25a2762b8..6395977e0 100644 --- a/plugins/config-browser/pom.xml +++ b/plugins/config-browser/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-config-browser-plugin diff --git a/plugins/convention/pom.xml b/plugins/convention/pom.xml index 5609415c0..f979c7a00 100644 --- a/plugins/convention/pom.xml +++ b/plugins/convention/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-convention-plugin diff --git a/plugins/dwr/pom.xml b/plugins/dwr/pom.xml index fec6997c2..e751c2757 100644 --- a/plugins/dwr/pom.xml +++ b/plugins/dwr/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-dwr-plugin diff --git a/plugins/embeddedjsp/pom.xml b/plugins/embeddedjsp/pom.xml index e6d994257..dabd3d6c7 100644 --- a/plugins/embeddedjsp/pom.xml +++ b/plugins/embeddedjsp/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-embeddedjsp-plugin diff --git a/plugins/gxp/pom.xml b/plugins/gxp/pom.xml index 14c296471..bcab9ab5a 100644 --- a/plugins/gxp/pom.xml +++ b/plugins/gxp/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-gxp-plugin diff --git a/plugins/jasperreports/pom.xml b/plugins/jasperreports/pom.xml index 69c0e7df2..5c879a6c2 100644 --- a/plugins/jasperreports/pom.xml +++ b/plugins/jasperreports/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-jasperreports-plugin diff --git a/plugins/java8-support/pom.xml b/plugins/java8-support/pom.xml index 4d26ade5a..5e21567f9 100644 --- a/plugins/java8-support/pom.xml +++ b/plugins/java8-support/pom.xml @@ -5,7 +5,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-java8-support-plugin diff --git a/plugins/javatemplates/pom.xml b/plugins/javatemplates/pom.xml index 1d193dc5d..67ca92f6d 100644 --- a/plugins/javatemplates/pom.xml +++ b/plugins/javatemplates/pom.xml @@ -25,7 +25,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-javatemplates-plugin diff --git a/plugins/jfreechart/pom.xml b/plugins/jfreechart/pom.xml index 9aed2b848..994f3b3b9 100644 --- a/plugins/jfreechart/pom.xml +++ b/plugins/jfreechart/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-jfreechart-plugin diff --git a/plugins/json/pom.xml b/plugins/json/pom.xml index bbe7f9dea..d621c0aed 100644 --- a/plugins/json/pom.xml +++ b/plugins/json/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-json-plugin diff --git a/plugins/junit/pom.xml b/plugins/junit/pom.xml index 94ec0b310..dbc46454a 100644 --- a/plugins/junit/pom.xml +++ b/plugins/junit/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-junit-plugin diff --git a/plugins/osgi/pom.xml b/plugins/osgi/pom.xml index 484ee03c7..0f998bff1 100644 --- a/plugins/osgi/pom.xml +++ b/plugins/osgi/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-osgi-plugin diff --git a/plugins/oval/pom.xml b/plugins/oval/pom.xml index bdfb5cf5e..6b658a8d8 100644 --- a/plugins/oval/pom.xml +++ b/plugins/oval/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-oval-plugin diff --git a/plugins/pell-multipart/pom.xml b/plugins/pell-multipart/pom.xml index a811d1d17..22e92b920 100644 --- a/plugins/pell-multipart/pom.xml +++ b/plugins/pell-multipart/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-pell-multipart-plugin diff --git a/plugins/plexus/pom.xml b/plugins/plexus/pom.xml index 066a87e24..1cc964a94 100644 --- a/plugins/plexus/pom.xml +++ b/plugins/plexus/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-plexus-plugin diff --git a/plugins/pom.xml b/plugins/pom.xml index c074d3642..0187de906 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 struts2-plugins diff --git a/plugins/portlet-tiles/pom.xml b/plugins/portlet-tiles/pom.xml index 833569ba6..5c1b03edb 100644 --- a/plugins/portlet-tiles/pom.xml +++ b/plugins/portlet-tiles/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-portlet-tiles-plugin diff --git a/plugins/portlet/pom.xml b/plugins/portlet/pom.xml index ddca94ce0..6006c6313 100644 --- a/plugins/portlet/pom.xml +++ b/plugins/portlet/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-portlet-plugin diff --git a/plugins/rest/pom.xml b/plugins/rest/pom.xml index f4fb1237f..4fb18f95b 100644 --- a/plugins/rest/pom.xml +++ b/plugins/rest/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-rest-plugin diff --git a/plugins/sitegraph/pom.xml b/plugins/sitegraph/pom.xml index 3eb549cd3..eecd52caa 100644 --- a/plugins/sitegraph/pom.xml +++ b/plugins/sitegraph/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-sitegraph-plugin diff --git a/plugins/sitemesh/pom.xml b/plugins/sitemesh/pom.xml index 239d403da..3259971d8 100644 --- a/plugins/sitemesh/pom.xml +++ b/plugins/sitemesh/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-sitemesh-plugin diff --git a/plugins/spring/pom.xml b/plugins/spring/pom.xml index 7ed9d45ba..812488181 100644 --- a/plugins/spring/pom.xml +++ b/plugins/spring/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-spring-plugin diff --git a/plugins/testng/pom.xml b/plugins/testng/pom.xml index 709e402eb..01a477a26 100644 --- a/plugins/testng/pom.xml +++ b/plugins/testng/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-testng-plugin diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml index e6bc1b7f8..a394ff3f0 100644 --- a/plugins/tiles/pom.xml +++ b/plugins/tiles/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1-SNAPSHOT + 2.5.1 struts2-tiles-plugin diff --git a/pom.xml b/pom.xml index 3e4ebd1d3..a1b9107ab 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 struts2-parent - 2.5.1-SNAPSHOT + 2.5.1 pom Struts 2 http://struts.apache.org/ @@ -31,7 +31,7 @@ scm:git:git://git.apache.org/struts.git scm:git:https://git-wip-us.apache.org/repos/asf/struts.git http://git.apache.org/struts.git - HEAD + STRUTS_2_5_1 From a2de25569770fcab30f589073647272cd6fe8aa7 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Tue, 14 Jun 2016 08:07:45 +0200 Subject: [PATCH 26/31] [maven-release-plugin] prepare for next development iteration --- apps/pom.xml | 2 +- apps/portlet/pom.xml | 2 +- apps/rest-showcase/pom.xml | 4 ++-- apps/showcase/pom.xml | 2 +- archetypes/pom.xml | 2 +- archetypes/struts2-archetype-angularjs/pom.xml | 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 | 8 ++------ bundles/admin/pom.xml | 2 +- bundles/demo/pom.xml | 2 +- bundles/pom.xml | 2 +- core/pom.xml | 2 +- plugins/bean-validation/pom.xml | 2 +- plugins/cdi/pom.xml | 2 +- plugins/config-browser/pom.xml | 2 +- plugins/convention/pom.xml | 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 +- plugins/jfreechart/pom.xml | 2 +- plugins/json/pom.xml | 2 +- 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 +- 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 +- pom.xml | 4 ++-- 45 files changed, 48 insertions(+), 52 deletions(-) diff --git a/apps/pom.xml b/apps/pom.xml index ba7419ee1..245f2b54d 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT struts2-apps pom diff --git a/apps/portlet/pom.xml b/apps/portlet/pom.xml index acd8f8975..54680ac21 100644 --- a/apps/portlet/pom.xml +++ b/apps/portlet/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-apps - 2.5.1 + 2.5.2-SNAPSHOT struts2-portlet diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index cc6eee8cd..48b796d0c 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -26,12 +26,12 @@ org.apache.struts struts2-apps - 2.5.1 + 2.5.2-SNAPSHOT struts2-rest-showcase war - 2.5.1 + 2.5.2-SNAPSHOT Struts 2 Rest Showcase Webapp Struts 2 Rest Showcase Example diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 70a6c8e4b..b114590b7 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-apps - 2.5.1 + 2.5.2-SNAPSHOT struts2-showcase diff --git a/archetypes/pom.xml b/archetypes/pom.xml index e08ff1a4a..19823b110 100644 --- a/archetypes/pom.xml +++ b/archetypes/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT struts2-archetypes diff --git a/archetypes/struts2-archetype-angularjs/pom.xml b/archetypes/struts2-archetype-angularjs/pom.xml index 371282914..dc2c50887 100644 --- a/archetypes/struts2-archetype-angularjs/pom.xml +++ b/archetypes/struts2-archetype-angularjs/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/archetypes/struts2-archetype-blank/pom.xml b/archetypes/struts2-archetype-blank/pom.xml index 82dc4b611..6fc370f86 100644 --- a/archetypes/struts2-archetype-blank/pom.xml +++ b/archetypes/struts2-archetype-blank/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/archetypes/struts2-archetype-convention/pom.xml b/archetypes/struts2-archetype-convention/pom.xml index b84ba7db2..6c6956afa 100644 --- a/archetypes/struts2-archetype-convention/pom.xml +++ b/archetypes/struts2-archetype-convention/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/archetypes/struts2-archetype-dbportlet/pom.xml b/archetypes/struts2-archetype-dbportlet/pom.xml index cbc4a92bf..0123029e0 100644 --- a/archetypes/struts2-archetype-dbportlet/pom.xml +++ b/archetypes/struts2-archetype-dbportlet/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/archetypes/struts2-archetype-plugin/pom.xml b/archetypes/struts2-archetype-plugin/pom.xml index d85024913..205594a19 100644 --- a/archetypes/struts2-archetype-plugin/pom.xml +++ b/archetypes/struts2-archetype-plugin/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/archetypes/struts2-archetype-portlet/pom.xml b/archetypes/struts2-archetype-portlet/pom.xml index 3040179c5..6717d4358 100644 --- a/archetypes/struts2-archetype-portlet/pom.xml +++ b/archetypes/struts2-archetype-portlet/pom.xml @@ -2,7 +2,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/archetypes/struts2-archetype-starter/pom.xml b/archetypes/struts2-archetype-starter/pom.xml index 87b58d84f..b96208e72 100644 --- a/archetypes/struts2-archetype-starter/pom.xml +++ b/archetypes/struts2-archetype-starter/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-archetypes - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/assembly/pom.xml b/assembly/pom.xml index 65c9bbf38..0b18c244d 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT struts2-assembly diff --git a/bom/pom.xml b/bom/pom.xml index 2d1d53a8c..ecc327562 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -10,7 +10,7 @@ struts2-bom - 2.5.1 + 2.5.2-SNAPSHOT pom Struts 2 Bill of Materials @@ -25,7 +25,7 @@ - 2.5.1 + 2.5.2-SNAPSHOT @@ -170,8 +170,4 @@ - - - STRUTS_2_5_1 - diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml index bfef28177..d713fe876 100644 --- a/bundles/admin/pom.xml +++ b/bundles/admin/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-osgi-bundles - 2.5.1 + 2.5.2-SNAPSHOT struts2-osgi-admin-bundle diff --git a/bundles/demo/pom.xml b/bundles/demo/pom.xml index 77af92e67..85e299e01 100644 --- a/bundles/demo/pom.xml +++ b/bundles/demo/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-osgi-bundles - 2.5.1 + 2.5.2-SNAPSHOT struts2-osgi-demo-bundle diff --git a/bundles/pom.xml b/bundles/pom.xml index 0e3bd8297..76e808405 100755 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT struts2-osgi-bundles diff --git a/core/pom.xml b/core/pom.xml index e6f694f6d..9864cb1a3 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT struts2-core jar diff --git a/plugins/bean-validation/pom.xml b/plugins/bean-validation/pom.xml index 20261942b..acdb80c7a 100644 --- a/plugins/bean-validation/pom.xml +++ b/plugins/bean-validation/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT 4.0.0 diff --git a/plugins/cdi/pom.xml b/plugins/cdi/pom.xml index 4b8012bb3..cb740cd36 100644 --- a/plugins/cdi/pom.xml +++ b/plugins/cdi/pom.xml @@ -25,7 +25,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-cdi-plugin diff --git a/plugins/config-browser/pom.xml b/plugins/config-browser/pom.xml index 6395977e0..5b0460497 100644 --- a/plugins/config-browser/pom.xml +++ b/plugins/config-browser/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-config-browser-plugin diff --git a/plugins/convention/pom.xml b/plugins/convention/pom.xml index f979c7a00..e00c3422b 100644 --- a/plugins/convention/pom.xml +++ b/plugins/convention/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-convention-plugin diff --git a/plugins/dwr/pom.xml b/plugins/dwr/pom.xml index e751c2757..5b5052cc1 100644 --- a/plugins/dwr/pom.xml +++ b/plugins/dwr/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-dwr-plugin diff --git a/plugins/embeddedjsp/pom.xml b/plugins/embeddedjsp/pom.xml index dabd3d6c7..d52daccd3 100644 --- a/plugins/embeddedjsp/pom.xml +++ b/plugins/embeddedjsp/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-embeddedjsp-plugin diff --git a/plugins/gxp/pom.xml b/plugins/gxp/pom.xml index bcab9ab5a..9d0177b01 100644 --- a/plugins/gxp/pom.xml +++ b/plugins/gxp/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-gxp-plugin diff --git a/plugins/jasperreports/pom.xml b/plugins/jasperreports/pom.xml index 5c879a6c2..229df5c81 100644 --- a/plugins/jasperreports/pom.xml +++ b/plugins/jasperreports/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-jasperreports-plugin diff --git a/plugins/java8-support/pom.xml b/plugins/java8-support/pom.xml index 5e21567f9..4ada2c3b1 100644 --- a/plugins/java8-support/pom.xml +++ b/plugins/java8-support/pom.xml @@ -5,7 +5,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-java8-support-plugin diff --git a/plugins/javatemplates/pom.xml b/plugins/javatemplates/pom.xml index 67ca92f6d..85f4746fe 100644 --- a/plugins/javatemplates/pom.xml +++ b/plugins/javatemplates/pom.xml @@ -25,7 +25,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-javatemplates-plugin diff --git a/plugins/jfreechart/pom.xml b/plugins/jfreechart/pom.xml index 994f3b3b9..df41a8cd6 100644 --- a/plugins/jfreechart/pom.xml +++ b/plugins/jfreechart/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-jfreechart-plugin diff --git a/plugins/json/pom.xml b/plugins/json/pom.xml index d621c0aed..b4f2e95aa 100644 --- a/plugins/json/pom.xml +++ b/plugins/json/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-json-plugin diff --git a/plugins/junit/pom.xml b/plugins/junit/pom.xml index dbc46454a..8f2fd4f84 100644 --- a/plugins/junit/pom.xml +++ b/plugins/junit/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-junit-plugin diff --git a/plugins/osgi/pom.xml b/plugins/osgi/pom.xml index 0f998bff1..47b42ec84 100644 --- a/plugins/osgi/pom.xml +++ b/plugins/osgi/pom.xml @@ -4,7 +4,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-osgi-plugin diff --git a/plugins/oval/pom.xml b/plugins/oval/pom.xml index 6b658a8d8..decad9ccd 100644 --- a/plugins/oval/pom.xml +++ b/plugins/oval/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-oval-plugin diff --git a/plugins/pell-multipart/pom.xml b/plugins/pell-multipart/pom.xml index 22e92b920..c20359b16 100644 --- a/plugins/pell-multipart/pom.xml +++ b/plugins/pell-multipart/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-pell-multipart-plugin diff --git a/plugins/plexus/pom.xml b/plugins/plexus/pom.xml index 1cc964a94..251f9eb78 100644 --- a/plugins/plexus/pom.xml +++ b/plugins/plexus/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-plexus-plugin diff --git a/plugins/pom.xml b/plugins/pom.xml index 0187de906..7eeddc0f3 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT struts2-plugins diff --git a/plugins/portlet-tiles/pom.xml b/plugins/portlet-tiles/pom.xml index 5c1b03edb..f1918544d 100644 --- a/plugins/portlet-tiles/pom.xml +++ b/plugins/portlet-tiles/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-portlet-tiles-plugin diff --git a/plugins/portlet/pom.xml b/plugins/portlet/pom.xml index 6006c6313..c134cb66c 100644 --- a/plugins/portlet/pom.xml +++ b/plugins/portlet/pom.xml @@ -3,7 +3,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-portlet-plugin diff --git a/plugins/rest/pom.xml b/plugins/rest/pom.xml index 4fb18f95b..2ab0f056b 100644 --- a/plugins/rest/pom.xml +++ b/plugins/rest/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-rest-plugin diff --git a/plugins/sitegraph/pom.xml b/plugins/sitegraph/pom.xml index eecd52caa..e536a83af 100644 --- a/plugins/sitegraph/pom.xml +++ b/plugins/sitegraph/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-sitegraph-plugin diff --git a/plugins/sitemesh/pom.xml b/plugins/sitemesh/pom.xml index 3259971d8..e881c92d1 100644 --- a/plugins/sitemesh/pom.xml +++ b/plugins/sitemesh/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-sitemesh-plugin diff --git a/plugins/spring/pom.xml b/plugins/spring/pom.xml index 812488181..b29a60e6e 100644 --- a/plugins/spring/pom.xml +++ b/plugins/spring/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-spring-plugin diff --git a/plugins/testng/pom.xml b/plugins/testng/pom.xml index 01a477a26..bc96e3024 100644 --- a/plugins/testng/pom.xml +++ b/plugins/testng/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-testng-plugin diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml index a394ff3f0..08351154f 100644 --- a/plugins/tiles/pom.xml +++ b/plugins/tiles/pom.xml @@ -26,7 +26,7 @@ org.apache.struts struts2-plugins - 2.5.1 + 2.5.2-SNAPSHOT struts2-tiles-plugin diff --git a/pom.xml b/pom.xml index a1b9107ab..713f5d6db 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 struts2-parent - 2.5.1 + 2.5.2-SNAPSHOT pom Struts 2 http://struts.apache.org/ @@ -31,7 +31,7 @@ scm:git:git://git.apache.org/struts.git scm:git:https://git-wip-us.apache.org/repos/asf/struts.git http://git.apache.org/struts.git - STRUTS_2_5_1 + HEAD From d5e0fe9207e86f11eb3ef3a77bd6dcb3aa2028ce Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Wed, 22 Jun 2016 10:56:31 +0200 Subject: [PATCH 27/31] WW-4648 Upgrades commons-fileupload to the latest version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 713f5d6db..9f4965e72 100644 --- a/pom.xml +++ b/pom.xml @@ -711,7 +711,7 @@ commons-fileupload commons-fileupload - 1.3.1 + 1.3.2 commons-io From 8dfe178585d06858eb307cfb2a1bf1995243476a Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Wed, 22 Jun 2016 10:38:12 +0200 Subject: [PATCH 28/31] Uses LocaleProvider and default TextProvider instead of evaluating expression --- .../org/apache/struts2/components/I18n.java | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/I18n.java b/core/src/main/java/org/apache/struts2/components/I18n.java index 4db0e077c..a04840fc1 100644 --- a/core/src/main/java/org/apache/struts2/components/I18n.java +++ b/core/src/main/java/org/apache/struts2/components/I18n.java @@ -21,7 +21,13 @@ package org.apache.struts2.components; -import com.opensymphony.xwork2.ActionContext; +import java.io.Writer; +import java.util.ResourceBundle; + +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.StrutsException; + import com.opensymphony.xwork2.LocaleProvider; import com.opensymphony.xwork2.TextProvider; import com.opensymphony.xwork2.TextProviderFactory; @@ -31,13 +37,6 @@ import com.opensymphony.xwork2.util.LocalizedTextUtil; import com.opensymphony.xwork2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsException; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; - -import java.io.Writer; -import java.util.Locale; -import java.util.ResourceBundle; /** * @@ -92,6 +91,8 @@ public class I18n extends Component { protected String name; protected Container container; private TextProvider textProvider; + private TextProvider defaultTextProvider; + private LocaleProvider localeProvider; public I18n(ValueStack stack) { super(stack); @@ -102,26 +103,31 @@ public class I18n extends Component { this.container = container; } + @Inject + public void setTextProvider(TextProvider textProvider) { + this.defaultTextProvider = textProvider; + } + + @Inject + public void setLocaleProvider(LocaleProvider localeProvider) { + this.localeProvider = localeProvider; + } + public boolean start(Writer writer) { boolean result = super.start(writer); try { String name = this.findString(this.name, "name", "Resource bundle name is required. Example: foo or foo_en"); - ResourceBundle bundle = (ResourceBundle) findValue("getTexts('" + name + "')"); + ResourceBundle bundle = defaultTextProvider.getTexts(name); if (bundle == null) { - bundle = LocalizedTextUtil.findResourceBundle(name, (Locale) getStack().getContext().get(ActionContext.LOCALE)); + bundle = LocalizedTextUtil.findResourceBundle(name, localeProvider.getLocale()); } if (bundle != null) { - final Locale locale = (Locale) getStack().getContext().get(ActionContext.LOCALE); TextProviderFactory tpf = new TextProviderFactory(); container.inject(tpf); - textProvider = tpf.createInstance(bundle, new LocaleProvider() { - public Locale getLocale() { - return locale; - } - }); + textProvider = tpf.createInstance(bundle, localeProvider); getStack().push(textProvider); pushed = true; } From cfcefcf5898313043ef903ce0873b15fb7cf1df4 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Wed, 22 Jun 2016 10:38:39 +0200 Subject: [PATCH 29/31] Drops commented out test --- .../apache/struts2/components/UIBeanTest.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/core/src/test/java/org/apache/struts2/components/UIBeanTest.java b/core/src/test/java/org/apache/struts2/components/UIBeanTest.java index 470cc9119..b2fc84399 100644 --- a/core/src/test/java/org/apache/struts2/components/UIBeanTest.java +++ b/core/src/test/java/org/apache/struts2/components/UIBeanTest.java @@ -164,21 +164,4 @@ public class UIBeanTest extends StrutsInternalTestCase { assertEquals("12", txtFld.getTheme()); } -// I couldn't figure out how to make this test work. Bailing for now. -// public void testEscapeLabel() throws Exception { -// ValueStack stack = ActionContext.getContext().getValueStack(); -// MockHttpServletRequest req = new MockHttpServletRequest(); -// MockHttpServletResponse res = new MockHttpServletResponse(); -// stack.push(this); -// -// TextField txtFld = new TextField(stack, req, res); -// txtFld.setKey("test['foo']"); -// txtFld.evaluateParams(); -// assertEquals("test_label", txtFld.getParameters().get("label")); -// } -// -// public String getText(String key) { -// assertEquals("test[\\'foo\\']", key); -// return "test_label"; -// } } From f096dd611e8f53bec0fde4a022b9c68501bcaf60 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Wed, 22 Jun 2016 10:46:09 +0200 Subject: [PATCH 30/31] Adds test to guard pre-evaulation of name attribute --- .../struts2/views/jsp/ui/TextfieldTest.java | 16 ++++++++++++++++ .../apache/struts2/views/jsp/ui/Textfield-14.txt | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java index d8143084c..806420480 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java @@ -337,4 +337,20 @@ public class TextfieldTest extends AbstractUITagTest { verify(TextFieldTag.class.getResource("Textfield-11.txt")); } + public void testNameEvaluation() throws Exception { + TestAction testAction = (TestAction) action; + testAction.setArray(new String[]{"test", "bar"}); + testAction.setFooInt(1); + + TextFieldTag tag = new TextFieldTag(); + tag.setPageContext(pageContext); + tag.setName("array[%{fooInt}]"); + + tag.doStartTag(); + tag.doEndTag(); + + verify(TextFieldTag.class.getResource("Textfield-12.txt")); + } + + } diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt new file mode 100644 index 000000000..fc43ebfbd --- /dev/null +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt @@ -0,0 +1,16 @@ +
    +<<<<<<< HEAD + + +======= + + +>>>>>>> c84810f... Adds test to guard pre-evaulation of name attribute + \ No newline at end of file From cd13846e198fbecc45072e43ea0ea2b7d3909116 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Wed, 22 Jun 2016 11:10:26 +0200 Subject: [PATCH 31/31] Fixes test and conflicts --- .../apache/struts2/views/jsp/ui/TextfieldTest.java | 2 +- .../apache/struts2/views/jsp/ui/Textfield-14.txt | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java index 806420480..73ad2180f 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java @@ -349,7 +349,7 @@ public class TextfieldTest extends AbstractUITagTest { tag.doStartTag(); tag.doEndTag(); - verify(TextFieldTag.class.getResource("Textfield-12.txt")); + verify(TextFieldTag.class.getResource("Textfield-14.txt")); } diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt index fc43ebfbd..fcb370391 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-14.txt @@ -1,16 +1,4 @@ -<<<<<<< HEAD - - -======= - ->>>>>>> c84810f... Adds test to guard pre-evaulation of name attribute + \ No newline at end of file
    +
    +
    +
    + + + +
    - - - -