struts git commit: WW-2069 Drops "id" and "name" attributes" on the tags where they are deprecated.
Repository: struts Updated Branches: refs/heads/master 2b4d37908 -> f8718f918 WW-2069 Drops "id" and "name" attributes" on the tags where they are deprecated. Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f8718f91 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f8718f91 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f8718f91 Branch: refs/heads/master Commit: f8718f9187028c20bf1c042a6a7bfaaadd4ec8b8 Parents: 2b4d379 Author: Aleksandr MashchenkoAuthored: Mon Nov 2 22:14:59 2015 +0200 Committer: Aleksandr Mashchenko Committed: Mon Nov 2 22:14:59 2015 +0200 -- .../apache/struts2/components/AppendIterator.java | 2 +- .../apache/struts2/components/ContextBean.java| 11 --- .../apache/struts2/components/MergeIterator.java | 2 +- .../java/org/apache/struts2/components/Set.java | 12 ++-- .../apache/struts2/views/jsp/ContextBeanTag.java | 8 .../views/jsp/iterator/IteratorGeneratorTag.java | 5 - .../views/jsp/iterator/SortIteratorTag.java | 7 +-- .../views/jsp/iterator/SubsetIteratorTag.java | 5 - core/src/site/resources/tags/action.html | 8 core/src/site/resources/tags/append.html | 8 core/src/site/resources/tags/bean.html| 8 core/src/site/resources/tags/date.html| 8 core/src/site/resources/tags/generator.html | 8 core/src/site/resources/tags/iterator.html| 8 core/src/site/resources/tags/merge.html | 8 core/src/site/resources/tags/number.html | 8 core/src/site/resources/tags/set.html | 18 +- core/src/site/resources/tags/sort.html| 8 core/src/site/resources/tags/subset.html | 8 core/src/site/resources/tags/text.html| 8 core/src/site/resources/tags/url.html | 8 .../apache/struts2/views/jsp/ActionTagTest.java | 6 +++--- .../struts2/views/jsp/AppendIteratorTagTest.java | 4 ++-- .../views/jsp/IteratorGeneratorTagTest.java | 2 +- .../apache/struts2/views/jsp/IteratorTagTest.java | 4 ++-- .../struts2/views/jsp/MergeIteratorTagTest.java | 4 ++-- .../struts2/views/jsp/SortIteratorTagTest.java| 4 ++-- .../struts2/views/jsp/SubsetIteratorTagTest.java | 4 ++-- .../org/apache/struts2/views/jsp/TextTagTest.java | 2 +- .../org/apache/struts2/views/jsp/URLTagTest.java | 2 +- .../apache/struts2/views/jsp/ui/DateTagTest.java | 2 +- 31 files changed, 23 insertions(+), 177 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/f8718f91/core/src/main/java/org/apache/struts2/components/AppendIterator.java -- diff --git a/core/src/main/java/org/apache/struts2/components/AppendIterator.java b/core/src/main/java/org/apache/struts2/components/AppendIterator.java index eebddad..c639b08 100644 --- a/core/src/main/java/org/apache/struts2/components/AppendIterator.java +++ b/core/src/main/java/org/apache/struts2/components/AppendIterator.java @@ -59,7 +59,7 @@ import java.util.List; * * * - * id (String) - the id of which if supplied will have the resultant + * var (String) - the name of which if supplied will have the resultant *appended iterator stored under in the stack's context * * http://git-wip-us.apache.org/repos/asf/struts/blob/f8718f91/core/src/main/java/org/apache/struts2/components/ContextBean.java -- diff --git a/core/src/main/java/org/apache/struts2/components/ContextBean.java b/core/src/main/java/org/apache/struts2/components/ContextBean.java index fb3f463..86f09bf 100644 --- a/core/src/main/java/org/apache/struts2/components/ContextBean.java +++ b/core/src/main/java/org/apache/struts2/components/ContextBean.java @@ -48,17 +48,6 @@ public abstract class ContextBean extends Component { } } -/** - * To keep backward compatibility - * TODO remove after 2.1 - * - * @param id the given id - */ -@StrutsTagAttribute(description="Deprecated. Use 'var' instead") -public void setId(String id) { -setVar(id); -} - protected String getVar() { return this.var; } http://git-wip-us.apache.org/repos/asf/struts/blob/f8718f91/core/src/main/java/org/apache/struts2/components/MergeIterator.java -- diff --git a/core/src/main/java/org/apache/struts2/components/MergeIterator.java
struts git commit: WW-4545 - Setting status code in HttpHeaders will be ignored
Repository: struts Updated Branches: refs/heads/support-2-3 8bbfb461c -> f29585248 WW-4545 - Setting status code in HttpHeaders will be ignored (cherry picked from commit 4cd9a74cb8efa8dc0d3c57ac267a70b0538f3bf0) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f2958524 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f2958524 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f2958524 Branch: refs/heads/support-2-3 Commit: f2958524823a2b514aa5de239d264cf6a622297d Parents: 8bbfb46 Author: Johannes GeppertAuthored: Thu Sep 10 19:11:12 2015 +0200 Committer: Aleksandr Mashchenko Committed: Thu Dec 17 19:45:59 2015 +0200 -- .../rest/DefaultContentTypeHandlerManager.java | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/f2958524/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java -- diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java b/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java index b1bcffc..c55f319 100644 --- a/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java +++ b/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java @@ -126,8 +126,12 @@ public class DefaultContentTypeHandlerManager implements ContentTypeHandlerManag */ public String handleResult(ActionConfig actionConfig, Object methodResult, Object target) throws IOException { String resultCode = readResultCode(methodResult); +Integer statusCode = readStatusCode(methodResult); HttpServletRequest req = ServletActionContext.getRequest(); HttpServletResponse res = ServletActionContext.getResponse(); +if(statusCode != null) { +res.setStatus(statusCode); +} ContentTypeHandler handler = getHandlerForResponse(req, res); if (handler != null) { @@ -143,13 +147,22 @@ public class DefaultContentTypeHandlerManager implements ContentTypeHandlerManag res.setContentLength(data.length); res.setContentType(handler.getContentType()); res.getOutputStream().write(data); -res.getOutputStream().close(); +res.getOutputStream().flush(); } } } return resultCode; } + +protected Integer readStatusCode(Object methodResult) { +if (methodResult instanceof HttpHeaders) { +return ((HttpHeaders) methodResult).getStatus(); +} else { +return null; +} +} + protected String readResultCode(Object methodResult) { if (methodResult == null) { return null;
[3/3] struts git commit: Add import for UUID
Add import for UUID Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/b448d799 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/b448d799 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/b448d799 Branch: refs/heads/support-2-3 Commit: b448d79959e14fcd2c7db8103c8173d0cf5385dc Parents: 9a0a0a1 Author: Aleksandr MashchenkoAuthored: Wed Jan 6 19:30:12 2016 +0200 Committer: Aleksandr Mashchenko Committed: Wed Jan 6 19:30:12 2016 +0200 -- .../struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/struts/blob/b448d799/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java index 1270e07..e22cee3 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java @@ -28,6 +28,7 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.UUID; /** * Multi-part form data request adapter for Jakarta Commons FileUpload package that
[1/3] struts git commit: WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input
Repository: struts Updated Branches: refs/heads/master 4f29d8861 -> a4f8d4921 refs/heads/support-2-3 bf46145ba -> b448d7995 WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a4f8d492 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a4f8d492 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a4f8d492 Branch: refs/heads/master Commit: a4f8d492144a62af2a7d5e934e62d737bdfc8058 Parents: 4f29d88 Author: Aleksandr MashchenkoAuthored: Wed Jan 6 19:24:56 2016 +0200 Committer: Aleksandr Mashchenko Committed: Wed Jan 6 19:24:56 2016 +0200 -- .../multipart/JakartaStreamMultiPartRequest.java | 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts/blob/a4f8d492/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java index 6727f3e..f4c4665 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java @@ -384,6 +384,12 @@ public class JakartaStreamMultiPartRequest implements MultiPartRequest { * @param location location */ private void processFileItemStreamAsFileField(FileItemStream itemStream, String location) { +// Skip file uploads that don't have a file name - meaning that no file was selected. +if (itemStream.getName() == null || itemStream.getName().trim().length() < 1) { +LOG.debug("No file has been uploaded for the field: {}", itemStream.getFieldName()); +return; +} + File file = null; try { // Create the temporary upload file. @@ -424,6 +430,10 @@ public class JakartaStreamMultiPartRequest implements MultiPartRequest { suffix = name.substring(name.lastIndexOf('.')); } +if (prefix.length() < 3) { +prefix = UUID.randomUUID().toString(); +} + File file = File.createTempFile(prefix + "_", suffix, new File(location)); LOG.debug("Creating temporary file '{}' (originally '{}').", file.getName(), fileName); return file;
[2/3] struts git commit: WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input
WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input (cherry picked from commit a4f8d492144a62af2a7d5e934e62d737bdfc8058) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9a0a0a16 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9a0a0a16 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9a0a0a16 Branch: refs/heads/support-2-3 Commit: 9a0a0a16e9a61b55d3906b9b7059ebc3356efab0 Parents: bf46145 Author: Aleksandr MashchenkoAuthored: Wed Jan 6 19:24:56 2016 +0200 Committer: Aleksandr Mashchenko Committed: Wed Jan 6 19:26:18 2016 +0200 -- .../multipart/JakartaStreamMultiPartRequest.java | 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts/blob/9a0a0a16/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java index 6fbd2c3..1270e07 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java @@ -392,6 +392,12 @@ public class JakartaStreamMultiPartRequest implements MultiPartRequest { * @param location */ private void processFileItemStreamAsFileField(FileItemStream itemStream, String location) { +// Skip file uploads that don't have a file name - meaning that no file was selected. +if (itemStream.getName() == null || itemStream.getName().trim().length() < 1) { +LOG.debug("No file has been uploaded for the field: {}", itemStream.getFieldName()); +return; +} + File file = null; try { // Create the temporary upload file. @@ -433,6 +439,10 @@ public class JakartaStreamMultiPartRequest implements MultiPartRequest { suffix = name.substring(name.lastIndexOf('.')); } +if (prefix.length() < 3) { +prefix = UUID.randomUUID().toString(); +} + File file = File.createTempFile(prefix + "_", suffix, new File(location)); LOG.debug("Creating temporary file '#0' (originally '#1').", file.getName(), fileName); return file;
struts git commit: WW-2069 Replaces 'id' and 'name' with 'var'.
Repository: struts Updated Branches: refs/heads/master ed8dc577b -> 705915abd WW-2069 Replaces 'id' and 'name' with 'var'. Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/705915ab Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/705915ab Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/705915ab Branch: refs/heads/master Commit: 705915abd22d1100a89497663bf0ba0fb81fd2f6 Parents: ed8dc57 Author: Aleksandr MashchenkoAuthored: Fri Nov 27 22:58:50 2015 +0200 Committer: Aleksandr Mashchenko Committed: Fri Nov 27 22:58:50 2015 +0200 -- .../src/main/webapp/WEB-INF/view/helloWorld.vm | 2 +- apps/portlet/src/main/webapp/tiles/footer.ftl | 2 +- apps/portlet/src/main/webapp/tiles/footer.jsp | 2 +- apps/portlet/src/main/webapp/tiles/index.jsp| 2 +- .../webapp/WEB-INF/empmanager/editSkill.jsp | 6 +-- .../webapp/WEB-INF/hangman/hangmanNonAjax.ftl | 52 ++-- .../hangman/updateCharacterAvailable.ftl| 24 - .../webapp/WEB-INF/hangman/updateGuessLeft.ftl | 4 +- .../webapp/WEB-INF/hangman/updateScaffold.ftl | 4 +- .../WEB-INF/hangman/updateVocabCharacters.ftl | 12 ++--- .../main/webapp/WEB-INF/person/edit-person.jsp | 6 +-- .../main/webapp/WEB-INF/person/list-people.ftl | 6 +-- .../main/webapp/WEB-INF/person/new-person.ftl | 6 +-- .../non-ui/actionPrefix/actionPrefixExample.ftl | 2 +- .../iteratorTag/appendIteratorTagDemoResult.jsp | 2 +- .../main/webapp/WEB-INF/example/HelloWorld.jsp | 4 +- .../src/main/webapp/WEB-INF/content/hello.jsp | 4 +- .../src/main/webapp/WEB-INF/view/index.jsp | 2 +- .../resources/config-browser/actionNames.ftl| 2 +- .../resources/config-browser/page-header.ftl| 8 +-- .../resources/config-browser/showConfig.ftl | 2 +- .../resources/config-browser/tigris-macros.ftl | 2 +- 22 files changed, 78 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/705915ab/apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm -- diff --git a/apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm b/apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm index 5007bf7..4fcf4d6 100644 --- a/apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm +++ b/apps/portlet/src/main/webapp/WEB-INF/view/helloWorld.vm @@ -1,4 +1,4 @@ Hello World from velocity! -#surl ("id=url" "action=index") +#surl ("var=url" "action=index") Back to the front page http://git-wip-us.apache.org/repos/asf/struts/blob/705915ab/apps/portlet/src/main/webapp/tiles/footer.ftl -- diff --git a/apps/portlet/src/main/webapp/tiles/footer.ftl b/apps/portlet/src/main/webapp/tiles/footer.ftl index adc2fd8..b5e7a6f 100644 --- a/apps/portlet/src/main/webapp/tiles/footer.ftl +++ b/apps/portlet/src/main/webapp/tiles/footer.ftl @@ -1,5 +1,5 @@ -<@s.url id="home" action="index" namespace="/view" /> +<@s.url var="home" action="index" namespace="/view" /> Powered by Struts2 Portlet/Tiles Plugin | <@s.a href="${home}">Back to front page http://git-wip-us.apache.org/repos/asf/struts/blob/705915ab/apps/portlet/src/main/webapp/tiles/footer.jsp -- diff --git a/apps/portlet/src/main/webapp/tiles/footer.jsp b/apps/portlet/src/main/webapp/tiles/footer.jsp index 5dda204..557f007 100644 --- a/apps/portlet/src/main/webapp/tiles/footer.jsp +++ b/apps/portlet/src/main/webapp/tiles/footer.jsp @@ -1,6 +1,6 @@ <%@ taglib prefix="s" uri="/struts-tags" %> - + Powered by Struts2 Portlet/Tiles Plugin | Back to front page http://git-wip-us.apache.org/repos/asf/struts/blob/705915ab/apps/portlet/src/main/webapp/tiles/index.jsp -- diff --git a/apps/portlet/src/main/webapp/tiles/index.jsp b/apps/portlet/src/main/webapp/tiles/index.jsp index 906abb1..875f60c 100644 --- a/apps/portlet/src/main/webapp/tiles/index.jsp +++ b/apps/portlet/src/main/webapp/tiles/index.jsp @@ -5,7 +5,7 @@ Features - + View FreeMarker Example http://git-wip-us.apache.org/repos/asf/struts/blob/705915ab/apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp -- diff --git a/apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp b/apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp index 9e0bc29..71f9f83 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/empmanager/editSkill.jsp +++
struts git commit: WW-4571 Drops deprecated escape attribute in property tag
Repository: struts Updated Branches: refs/heads/master c3ec2c339 -> ed8dc577b WW-4571 Drops deprecated escape attribute in property tag Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/ed8dc577 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/ed8dc577 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/ed8dc577 Branch: refs/heads/master Commit: ed8dc577b7e6c4fa02cba853c62f82b2e3b0ed15 Parents: c3ec2c3 Author: Aleksandr MashchenkoAuthored: Wed Nov 25 09:01:20 2015 +0200 Committer: Aleksandr Mashchenko Committed: Wed Nov 25 09:01:20 2015 +0200 -- .../main/java/org/apache/struts2/components/Property.java | 10 -- .../java/org/apache/struts2/views/jsp/PropertyTag.java| 8 ++-- core/src/site/resources/tags/property.html| 8 .../org/apache/struts2/views/jsp/PropertyTagTest.java | 6 +++--- 4 files changed, 9 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/main/java/org/apache/struts2/components/Property.java -- diff --git a/core/src/main/java/org/apache/struts2/components/Property.java b/core/src/main/java/org/apache/struts2/components/Property.java index 6baba58..9d2c2b6 100644 --- a/core/src/main/java/org/apache/struts2/components/Property.java +++ b/core/src/main/java/org/apache/struts2/components/Property.java @@ -43,7 +43,10 @@ import java.io.Writer; * * * default (String) - The default value to be used if value attribute is null - * escape (Boolean) - Escape HTML. Default to true + * escapeCsv (Boolean) - Escape CSV. Defaults to false + * escapeHtml (Boolean) - Escape HTML. Defaults to true + * escapeJavaScript (Boolean) - Escape JavaScript. Defaults to false + * escapeXml (Boolean) - Escape XML. Defaults to false * value (Object) - value to be displayed * * @@ -102,11 +105,6 @@ public class Property extends Component { this.defaultValue = defaultValue; } -@StrutsTagAttribute(description="Deprecated. Use 'escapeHtml'. Whether to escape HTML", type="Boolean", defaultValue="true") -public void setEscape(boolean escape) { -this.escapeHtml = escape; -} - @StrutsTagAttribute(description="Whether to escape HTML", type="Boolean", defaultValue="true") public void setEscapeHtml(boolean escape) { this.escapeHtml = escape; http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java -- diff --git a/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java b/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java index 6176e49..560bc7b 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java @@ -53,8 +53,8 @@ public class PropertyTag extends ComponentTagSupport { Property tag = (Property) component; tag.setDefault(defaultValue); -tag.setValue(value); -tag.setEscape(escapeHtml); +tag.setValue(value); +tag.setEscapeHtml(escapeHtml); tag.setEscapeJavaScript(escapeJavaScript); tag.setEscapeXml(escapeXml); tag.setEscapeCsv(escapeCsv); @@ -64,10 +64,6 @@ public class PropertyTag extends ComponentTagSupport { this.defaultValue = defaultValue; } -public void setEscape(boolean escape) { -this.escapeHtml = escape; -} - public void setEscapeHtml(boolean escapeHtml) { this.escapeHtml = escapeHtml; } http://git-wip-us.apache.org/repos/asf/struts/blob/ed8dc577/core/src/site/resources/tags/property.html -- diff --git a/core/src/site/resources/tags/property.html b/core/src/site/resources/tags/property.html index 033984d..db893a0 100644 --- a/core/src/site/resources/tags/property.html +++ b/core/src/site/resources/tags/property.html @@ -42,14 +42,6 @@ Please do not edit it directly. The default value to be used if value attribute is null - escape - false - true - false - Boolean - Deprecated. Use 'escapeHtml'. Whether to escape HTML - -
struts git commit: Fixes WW-4529 and few other typos
Repository: struts Updated Branches: refs/heads/master 39cc611d7 -> e28e5f03a Fixes WW-4529 and few other typos Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e28e5f03 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e28e5f03 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e28e5f03 Branch: refs/heads/master Commit: e28e5f03a6fd56797fb69d9d2422a39c176a6317 Parents: 39cc611 Author: Aleksandr MashchenkoAuthored: Sat Jun 11 21:17:01 2016 +0300 Committer: Aleksandr Mashchenko Committed: Sat Jun 11 21:17:01 2016 +0300 -- .../xwork2/interceptor/StaticParametersInterceptor.java| 2 +- .../opensymphony/xwork2/validator/DelegatingValidatorContext.java | 2 +- .../main/java/org/apache/struts2/components/DoubleListUIBean.java | 2 +- core/src/main/java/org/apache/struts2/components/ListUIBean.java | 2 +- core/src/main/java/org/apache/struts2/components/Set.java | 2 +- .../main/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(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/e28e5f03/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java -- 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 914a2a1..d3e2df2 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 acThe action context http://git-wip-us.apache.org/repos/asf/struts/blob/e28e5f03/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java -- 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 0f56055..cf6de26 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(); http://git-wip-us.apache.org/repos/asf/struts/blob/e28e5f03/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java -- 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 22e53fa..5383a53 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. * * http://git-wip-us.apache.org/repos/asf/struts/blob/e28e5f03/core/src/main/java/org/apache/struts2/components/ListUIBean.java -- diff --git
struts git commit: WW-4644 - Drops xwork-core from bom
Repository: struts Updated Branches: refs/heads/master 095960b56 -> 39cc611d7 WW-4644 - Drops xwork-core from bom Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/39cc611d Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/39cc611d Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/39cc611d Branch: refs/heads/master Commit: 39cc611d7205a6fb44fb18ccf36502bcab5bca23 Parents: 095960b Author: Aleksandr MashchenkoAuthored: Sat Jun 11 20:30:05 2016 +0300 Committer: Aleksandr Mashchenko Committed: Sat Jun 11 20:30:05 2016 +0300 -- bom/pom.xml | 5 - 1 file changed, 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/39cc611d/bom/pom.xml -- diff --git a/bom/pom.xml b/bom/pom.xml index 13098b3..6e3ccab 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -44,11 +44,6 @@ -org.apache.struts.xwork -xwork-core -${struts-version.version} - - org.apache.struts struts2-core ${struts-version.version}
[1/2] struts git commit: WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI
Repository: struts Updated Branches: refs/heads/master ee83d4a6d -> e0003f047 refs/heads/support-2-3 7c4bb7e7b -> ff4cdd967 WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e0003f04 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e0003f04 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e0003f04 Branch: refs/heads/master Commit: e0003f0471f98d5986844cd799555618aae88fce Parents: ee83d4a Author: Aleksandr MashchenkoAuthored: Thu Jan 14 20:01:57 2016 +0200 Committer: Aleksandr Mashchenko Committed: Thu Jan 14 20:01:57 2016 +0200 -- .../apache/struts2/rest/RestActionMapper.java | 15 -- .../struts2/rest/RestActionMapperTest.java | 29 2 files changed, 42 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/e0003f04/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java -- diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java index 816843a..d25b725 100644 --- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java +++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java @@ -308,9 +308,20 @@ public class RestActionMapper extends DefaultActionMapper { private void handleDynamicMethodInvocation(ActionMapping mapping, String name) { int exclamation = name.lastIndexOf("!"); if (exclamation != -1) { -mapping.setName(name.substring(0, exclamation)); +String actionName = name.substring(0, exclamation); +String actionMethod = name.substring(exclamation + 1); + +// WW-4585 +// add any ; appendix to name, it will be handled later in getMapping method +int scPos = actionMethod.indexOf(';'); +if (scPos != -1) { +actionName = actionName + actionMethod.substring(scPos); +actionMethod = actionMethod.substring(0, scPos); +} + +mapping.setName(actionName); if (allowDynamicMethodCalls) { -mapping.setMethod(name.substring(exclamation + 1)); +mapping.setMethod(actionMethod); } else { mapping.setMethod(null); } http://git-wip-us.apache.org/repos/asf/struts/blob/e0003f04/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java -- diff --git a/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java b/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java index 8d39cc1..9903265 100644 --- a/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java +++ b/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java @@ -179,6 +179,35 @@ public class RestActionMapperTest extends TestCase { assertEquals("show", mapping.getMethod()); } +public void testGetJsessionIdSemicolonMappingWithMethod() throws Exception { + req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g"); +req.setServletPath("/animals/dog/fido"); +req.setMethod("GET"); + +ActionMapping mapping = mapper.getMapping(req, configManager); + +assertEquals("/animals", mapping.getNamespace()); +assertEquals("dog", mapping.getName()); +assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]); +assertEquals("show", mapping.getMethod()); +} + +public void testGetJsessionIdSemicolonMappingWithMethodAllowDMI() throws Exception { + req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g"); +req.setServletPath("/animals/dog/fido"); +req.setMethod("GET"); + +// allow DMI +mapper.setAllowDynamicMethodCalls("true"); + +ActionMapping mapping = mapper.getMapping(req, configManager); + +assertEquals("/animals", mapping.getNamespace()); +assertEquals("dog", mapping.getName()); +assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]); +assertEquals("update", mapping.getMethod()); +} + public void testParseNameAndNamespace() { tryUri("/foo/23", "", "foo/23"); tryUri("/foo/", "", "foo/");
[2/2] struts git commit: WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI
WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/ff4cdd96 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/ff4cdd96 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/ff4cdd96 Branch: refs/heads/support-2-3 Commit: ff4cdd967031ed21740ee555d9e0c58b2033aa0c Parents: 7c4bb7e Author: Aleksandr MashchenkoAuthored: Thu Jan 14 20:08:21 2016 +0200 Committer: Aleksandr Mashchenko Committed: Thu Jan 14 20:08:21 2016 +0200 -- .../apache/struts2/rest/RestActionMapper.java | 15 -- .../struts2/rest/RestActionMapperTest.java | 29 2 files changed, 42 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/ff4cdd96/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java -- diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java index c4fd827..840ddfe 100644 --- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java +++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java @@ -299,9 +299,20 @@ public class RestActionMapper extends DefaultActionMapper { private void handleDynamicMethodInvocation(ActionMapping mapping, String name) { int exclamation = name.lastIndexOf("!"); if (exclamation != -1) { -mapping.setName(name.substring(0, exclamation)); +String actionName = name.substring(0, exclamation); +String actionMethod = name.substring(exclamation + 1); + +// WW-4585 +// add any ; appendix to name, it will be handled later in getMapping method +int scPos = actionMethod.indexOf(';'); +if (scPos != -1) { +actionName = actionName + actionMethod.substring(scPos); +actionMethod = actionMethod.substring(0, scPos); +} + +mapping.setName(actionName); if (allowDynamicMethodCalls) { -mapping.setMethod(name.substring(exclamation + 1)); +mapping.setMethod(actionMethod); } else { mapping.setMethod(null); } http://git-wip-us.apache.org/repos/asf/struts/blob/ff4cdd96/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java -- diff --git a/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java b/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java index 8d39cc1..9903265 100644 --- a/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java +++ b/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionMapperTest.java @@ -179,6 +179,35 @@ public class RestActionMapperTest extends TestCase { assertEquals("show", mapping.getMethod()); } +public void testGetJsessionIdSemicolonMappingWithMethod() throws Exception { + req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g"); +req.setServletPath("/animals/dog/fido"); +req.setMethod("GET"); + +ActionMapping mapping = mapper.getMapping(req, configManager); + +assertEquals("/animals", mapping.getNamespace()); +assertEquals("dog", mapping.getName()); +assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]); +assertEquals("show", mapping.getMethod()); +} + +public void testGetJsessionIdSemicolonMappingWithMethodAllowDMI() throws Exception { + req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g"); +req.setServletPath("/animals/dog/fido"); +req.setMethod("GET"); + +// allow DMI +mapper.setAllowDynamicMethodCalls("true"); + +ActionMapping mapping = mapper.getMapping(req, configManager); + +assertEquals("/animals", mapping.getNamespace()); +assertEquals("dog", mapping.getName()); +assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]); +assertEquals("update", mapping.getMethod()); +} + public void testParseNameAndNamespace() { tryUri("/foo/23", "", "foo/23"); tryUri("/foo/", "", "foo/");
struts git commit: make test passed for people not using GMT.
Repository: struts Updated Branches: refs/heads/support-2-3 ff4cdd967 -> a39879317 make test passed for people not using GMT. (cherry picked from commit 32ec7a669c4c1103f7778f379d5626b52954d427) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a3987931 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a3987931 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a3987931 Branch: refs/heads/support-2-3 Commit: a398793177829705345e4841974b909b3ce9e728 Parents: ff4cdd9 Author: donghuiAuthored: Mon Jan 4 11:23:51 2016 +0800 Committer: Aleksandr Mashchenko Committed: Thu Jan 14 20:11:54 2016 +0200 -- .../apache/struts2/rest/DefaultHttpHeadersTest.java | 16 1 file changed, 12 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/a3987931/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java -- diff --git a/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java b/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java index f46a203..d80c33b 100644 --- a/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java +++ b/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java @@ -27,6 +27,8 @@ import org.springframework.mock.web.MockHttpServletResponse; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; +import java.util.TimeZone; import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST; import static javax.servlet.http.HttpServletResponse.SC_CREATED; @@ -133,7 +135,7 @@ public class DefaultHttpHeadersTest extends TestCase { Date now = new Date(); DefaultHttpHeaders headers = new DefaultHttpHeaders() .lastModified(now); -mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz").format(now)); +mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(now)); headers.apply(mockRequest, mockResponse, new Object()); assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus()); @@ -152,7 +154,7 @@ public class DefaultHttpHeadersTest extends TestCase { public void testLastModifiedSince() { Date now = new Date(); DefaultHttpHeaders headers = new DefaultHttpHeaders().lastModified(now); -mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz").format(now)); +mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(now)); headers.apply(mockRequest, mockResponse, new Object()); assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus()); @@ -161,7 +163,7 @@ public class DefaultHttpHeadersTest extends TestCase { public void testLastModifiedSinceIsOlder() { Date now = new Date(); DefaultHttpHeaders headers = new DefaultHttpHeaders().lastModified(now); -mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz").format(new Date(now.getTime() - 1000 * 60 * 60))); +mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(new Date(now.getTime() - 1000 * 60 * 60))); headers.apply(mockRequest, mockResponse, new Object()); assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus()); @@ -173,7 +175,7 @@ public class DefaultHttpHeadersTest extends TestCase { .lastModified(now) .withETag("asdf"); mockRequest.addHeader("If-None-Match", "asdf"); -mockRequest.addHeader("If-Modified-Since", new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz").format(now)); +mockRequest.addHeader("If-Modified-Since", getGMTDateFormat().format(now)); headers.apply(mockRequest, mockResponse, new Object()); assertEquals(SC_NOT_MODIFIED, mockResponse.getStatus()); @@ -219,4 +221,10 @@ public class DefaultHttpHeadersTest extends TestCase { assertEquals(SC_OK, mockResponse.getStatus()); } + +private SimpleDateFormat getGMTDateFormat() { +SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz", Locale.US); +format.setTimeZone(TimeZone.getTimeZone("GMT")); +return format; +} }
[2/2] struts git commit: WW-4622 - getRealPath NPE check
WW-4622 - getRealPath NPE check Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/b6a7a0e3 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/b6a7a0e3 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/b6a7a0e3 Branch: refs/heads/master Commit: b6a7a0e38a71707523517fa33570955c182e7bdc Parents: e53a340 Author: Aleksandr MashchenkoAuthored: Wed Apr 6 19:39:39 2016 +0300 Committer: Aleksandr Mashchenko Committed: Wed Apr 6 19:39:39 2016 +0300 -- .../tiles/StrutsWildcardServletApplicationContext.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/b6a7a0e3/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java -- diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java index 70a21ed..df6152b 100644 --- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java +++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java @@ -54,8 +54,12 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC for (Object path : context.getResourcePaths("/")) { try { -URL url = new File(context.getRealPath(String.valueOf(path))).toURI().toURL(); -urls.add(url); +String realPath = context.getRealPath(String.valueOf(path)); + +if (realPath != null) { +URL url = new File(realPath).toURI().toURL(); +urls.add(url); +} } catch (MalformedURLException e) { throw new ConfigurationException(e); }
[1/2] struts git commit: WW-4622 - Adds fallback to static config definitions to allow work in restricted envs (cherry picked from 6770b35), getRealPath NPE check; WW-4623, WW-4624 - Adds support for
Repository: struts Updated Branches: refs/heads/master e53a3406e -> b6a7a0e38 refs/heads/support-2-3 17dab897d -> 5ce807aae WW-4622 - Adds fallback to static config definitions to allow work in restricted envs (cherry picked from 6770b35), getRealPath NPE check; WW-4623, WW-4624 - Adds support for multiple tiles defintions (cherry picked from c12cd61) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5ce807aa Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5ce807aa Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5ce807aa Branch: refs/heads/support-2-3 Commit: 5ce807aaea3b3efc1c8de2c064b43052b0b8c73b Parents: 17dab89 Author: Aleksandr MashchenkoAuthored: Wed Apr 6 19:36:13 2016 +0300 Committer: Aleksandr Mashchenko Committed: Wed Apr 6 19:36:13 2016 +0300 -- .../struts2/tiles/StrutsTilesContainerFactory.java | 16 .../struts2/tiles/StrutsTilesInitializer.java | 13 +++-- ...trutsWildcardServletTilesApplicationContext.java | 8 ++-- 3 files changed, 29 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/5ce807aa/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java -- diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java index b96884c..871ccf3 100644 --- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java +++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java @@ -63,6 +63,8 @@ import org.apache.tiles.renderer.impl.ChainedDelegateAttributeRenderer; import org.apache.tiles.servlet.context.ServletUtil; import org.apache.tiles.util.URLUtil; +import com.opensymphony.xwork2.util.TextParseUtil; + import javax.el.ArrayELResolver; import javax.el.BeanELResolver; import javax.el.CompositeELResolver; @@ -73,6 +75,7 @@ import javax.el.ResourceBundleELResolver; import javax.servlet.ServletContext; import java.io.IOException; import java.net.URL; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -201,7 +204,12 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory { @Override protected List getSourceURLs(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory) { try { -Set finalSet = applicationContext.getResources(getTilesDefinitionPattern(applicationContext.getInitParams())); +Set finalSet = new HashSet(); + +Set definitions = getTilesDefinitions(applicationContext.getInitParams()); +for (String definition : definitions) { +finalSet.addAll(applicationContext.getResources(definition)); +} return URLUtil.getBaseTilesDefinitionURLs(finalSet); } catch (IOException e) { @@ -209,11 +217,11 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory { } } -protected String getTilesDefinitionPattern(Map params) { +protected Set getTilesDefinitions(Map params) { if (params.containsKey(DefinitionsFactory.DEFINITIONS_CONFIG)) { -return params.get(DefinitionsFactory.DEFINITIONS_CONFIG); +return TextParseUtil.commaDelimitedStringToSet(params.get(DefinitionsFactory.DEFINITIONS_CONFIG)); } -return TILES_DEFAULT_PATTERN; +return TextParseUtil.commaDelimitedStringToSet(TILES_DEFAULT_PATTERN); } protected ELAttributeEvaluator createELEvaluator(TilesApplicationContext applicationContext) { http://git-wip-us.apache.org/repos/asf/struts/blob/5ce807aa/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java -- diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java index 550c6b1..c667104 100644 --- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java +++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java @@ -22,7 +22,9 @@ package org.apache.struts2.tiles; import com.opensymphony.xwork2.util.logging.Logger; import com.opensymphony.xwork2.util.logging.LoggerFactory; import org.apache.tiles.TilesApplicationContext; +import org.apache.tiles.definition.DefinitionsFactory; import
struts git commit: Updates email validator javadoc and tests
Repository: struts Updated Branches: refs/heads/master c12cd6194 -> e53a3406e Updates email validator javadoc and tests Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e53a3406 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e53a3406 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e53a3406 Branch: refs/heads/master Commit: e53a3406e0bc4fae4bd16799a0db5d449c44390b Parents: c12cd61 Author: Aleksandr MashchenkoAuthored: Wed Apr 6 18:52:22 2016 +0300 Committer: Aleksandr Mashchenko Committed: Wed Apr 6 18:52:22 2016 +0300 -- .../opensymphony/xwork2/validator/validators/EmailValidator.java | 4 ++-- .../com/opensymphony/xwork2/validator/EmailValidatorTest.java| 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/e53a3406/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java b/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java index d54a1fa..9b196d5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java +++ b/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java @@ -23,7 +23,7 @@ package com.opensymphony.xwork2.validator.validators; * The regular expression used to validate that the string is an email address is: * * - * \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\\b + * \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tech|tel|travel|xxx)$\\b * * * You can also specify expression, caseSensitive and trim params as a OGNL expression, see the example below. @@ -80,7 +80,7 @@ public class EmailValidator extends RegexFieldValidator { // see XW-371 public static final String EMAIL_ADDRESS_PATTERN = - "\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx|tech)$\\b"; + "\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tech|tel|travel|xxx)$\\b"; public EmailValidator() { setRegex(EMAIL_ADDRESS_PATTERN); http://git-wip-us.apache.org/repos/asf/struts/blob/e53a3406/core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java -- diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java b/core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java index d24d795..8d32685 100644 --- a/core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java @@ -45,6 +45,7 @@ public class EmailValidatorTest extends XWorkTestCase { assertTrue(verifyEmailValidity("tmj'e...@yahoo.com")); assertTrue(verifyEmailValidity("ferda+mrave...@yahoo.com")); assertTrue(verifyEmailValidity("ferda+mrave...@yahoo.com")); +assertTrue(verifyEmailValidity("u...@domainname.tech")); assertFalse(verifyEmailValidity("tm_jee#ma...@yahoo.co.uk")); assertFalse(verifyEmailValidity("tm_jee@ yahoo.co.uk"));
[2/2] struts git commit: WW-4614 - Remove div and table tags (table)
WW-4614 - Remove div and table tags (table) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9ab4b58f Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9ab4b58f Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9ab4b58f Branch: refs/heads/master Commit: 9ab4b58f75c105218c56b415a23fe2d28bdc0a0b Parents: c95c347 Author: Aleksandr MashchenkoAuthored: Fri Mar 25 21:23:34 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 25 21:23:34 2016 +0200 -- .../main/resources/template/simple/table.ftl| 76 1 file changed, 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/9ab4b58f/core/src/main/resources/template/simple/table.ftl -- diff --git a/core/src/main/resources/template/simple/table.ftl b/core/src/main/resources/template/simple/table.ftl deleted file mode 100644 index d7efb06..000 --- a/core/src/main/resources/template/simple/table.ftl +++ /dev/null @@ -1,76 +0,0 @@ -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#assign webTable = tag/> -<#assign tableModel = webTable.model/> - -<#if tableModel??> - - - - - - -<#list webTable.columns as curColumn> -<#if curColumn.visible> - -<#if webTable.sortable> - - -${curColumn.displayName} - - - - -<#if false> - -<#else> -<@s.param name="${webTable.sortOrderLinkName}" value="ASC"/>"> - - - - - - - - - - -<#else> -${curColumn.displayName} - - - - - -<#list webTable.rowIterator as curRow> - -<#list curRow as curColumn> -${curColumn} - - - - - - - - \ No newline at end of file
[1/2] struts git commit: WW-4614 - Remove div and table tags (div)
Repository: struts Updated Branches: refs/heads/master 1056cf057 -> 9ab4b58f7 WW-4614 - Remove div and table tags (div) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/c95c347d Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c95c347d Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c95c347d Branch: refs/heads/master Commit: c95c347d4ebf9d3a97e6e4c0ad9fc57d6031e9e2 Parents: 1056cf0 Author: Aleksandr MashchenkoAuthored: Fri Mar 25 21:23:18 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 25 21:23:18 2016 +0200 -- .../java/org/apache/struts2/components/Div.java | 59 --- .../apache/struts2/views/DefaultTagLibrary.java | 2 - .../struts2/views/freemarker/tags/DivModel.java | 43 -- .../views/freemarker/tags/StrutsModels.java | 9 --- .../org/apache/struts2/views/jsp/ui/DivTag.java | 39 - .../views/velocity/components/DivDirective.java | 47 --- .../resources/template/simple/div-close.ftl | 23 core/src/main/resources/template/simple/div.ftl | 32 -- .../struts2/components/UIComponentTest.java | 23 .../apache/struts2/views/jsp/ui/DivTest.java| 56 -- .../org/apache/struts2/views/jsp/ui/div-1.txt | 3 - .../struts2/views/java/simple/DivHandler.java | 46 --- .../struts2/views/java/simple/SimpleTheme.java | 2 - .../struts2/views/java/simple/DivTest.java | 61 14 files changed, 445 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/c95c347d/core/src/main/java/org/apache/struts2/components/Div.java -- diff --git a/core/src/main/java/org/apache/struts2/components/Div.java b/core/src/main/java/org/apache/struts2/components/Div.java deleted file mode 100644 index 5967686..000 --- a/core/src/main/java/org/apache/struts2/components/Div.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * Creates an HTML div - * - * - */ -@StrutsTag( -name="div", -tldTagClass="org.apache.struts2.views.jsp.ui.DivTag", -description="Render an HTML div", -allowDynamicAttributes=true) -public class Div extends ClosingUIBean { - -public static final String TEMPLATE = "div"; -public static final String TEMPLATE_CLOSE = "div-close"; -public static final String COMPONENT_NAME = Div.class.getName(); - -public Div(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { -super(stack, request, response); -} - -public String getDefaultOpenTemplate() { -return TEMPLATE; -} - -protected String getDefaultTemplate() { -return TEMPLATE_CLOSE; -} -} http://git-wip-us.apache.org/repos/asf/struts/blob/c95c347d/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java -- diff --git a/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java b/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java index 2c48370..3628eb9 100644 --- a/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java +++ b/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java @@ -38,7 +38,6 @@ import org.apache.struts2.views.velocity.components.CheckBoxListDirective; import org.apache.struts2.views.velocity.components.ComboBoxDirective; import org.apache.struts2.views.velocity.components.ComponentDirective; import org.apache.struts2.views.velocity.components.DateDirective; -import org.apache.struts2.views.velocity.components.DivDirective; import
[1/3] struts git commit: WW-4586 Custom StrutsTypeConverter's convertToString not called in radio and checkboxlist tags
Repository: struts Updated Branches: refs/heads/master 2b92ebb50 -> 866b8902c WW-4586 Custom StrutsTypeConverter's convertToString not called in radio and checkboxlist tags Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/7a0ae0eb Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/7a0ae0eb Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/7a0ae0eb Branch: refs/heads/master Commit: 7a0ae0ebae8fe4deddc93bbfb4a76dbe09cefc77 Parents: 2b92ebb Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:37:51 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:37:51 2016 +0200 -- core/src/main/resources/template/simple/checkboxlist.ftl | 3 ++- core/src/main/resources/template/simple/radiomap.ftl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/7a0ae0eb/core/src/main/resources/template/simple/checkboxlist.ftl -- diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl index 4f262ec..aac9ca1 100644 --- a/core/src/main/resources/template/simple/checkboxlist.ftl +++ b/core/src/main/resources/template/simple/checkboxlist.ftl @@ -26,8 +26,10 @@ <#assign itemCount = itemCount + 1/> <#if parameters.listKey??> <#assign itemKey = stack.findValue(parameters.listKey)/> +<#assign itemKeyStr = stack.findString(parameters.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> +<#assign itemKeyStr = stack.findString('top')> <#if parameters.listLabelKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale @@ -59,7 +61,6 @@ <#assign itemTitle = ''/> -<#assign itemKeyStr=itemKey.toString() /> <#if parameters.id?has_content> id="${parameters.id?html}-${itemCount}"<#rt/> http://git-wip-us.apache.org/repos/asf/struts/blob/7a0ae0eb/core/src/main/resources/template/simple/radiomap.ftl -- diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index 80b8815..61950e9 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -23,10 +23,11 @@ <@s.iterator value="parameters.list"> <#if parameters.listKey??> <#assign itemKey = stack.findValue(parameters.listKey)/> +<#assign itemKeyStr = stack.findString(parameters.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> +<#assign itemKeyStr = stack.findString('top')> -<#assign itemKeyStr = itemKey.toString() /> <#if parameters.listValueKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale file for it's localized value. This is then used as a label -->
[2/3] struts git commit: formatting
formatting Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/820c52dd Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/820c52dd Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/820c52dd Branch: refs/heads/master Commit: 820c52dd2689add4e59f3459c01a52bdd391e712 Parents: 7a0ae0e Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:39:58 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:39:58 2016 +0200 -- core/src/main/resources/template/simple/checkboxlist.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/820c52dd/core/src/main/resources/template/simple/checkboxlist.ftl -- diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl index aac9ca1..c90e024 100644 --- a/core/src/main/resources/template/simple/checkboxlist.ftl +++ b/core/src/main/resources/template/simple/checkboxlist.ftl @@ -27,9 +27,9 @@ <#if parameters.listKey??> <#assign itemKey = stack.findValue(parameters.listKey)/> <#assign itemKeyStr = stack.findString(parameters.listKey)/> -<#else> -<#assign itemKey = stack.findValue('top')/> -<#assign itemKeyStr = stack.findString('top')> +<#else> +<#assign itemKey = stack.findValue('top')/> +<#assign itemKeyStr = stack.findString('top')> <#if parameters.listLabelKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale
[3/3] struts git commit: radio checked fix
radio checked fix Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/866b8902 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/866b8902 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/866b8902 Branch: refs/heads/master Commit: 866b8902cd62dfdc9245b6dbb76e0f4fff818b4d Parents: 820c52d Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:43:07 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:43:07 2016 +0200 -- core/src/main/resources/template/simple/radiomap.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/866b8902/core/src/main/resources/template/simple/radiomap.ftl -- diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index 61950e9..9c846e5 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -65,7 +65,7 @@ name="${parameters.name?html}"<#rt/> id="${parameters.id?html}${itemKeyStr?html}"<#rt/> -<#if tag.contains(parameters.nameValue!'', itemKeyStr)> +<#if tag.contains(parameters.nameValue, itemKey)> checked="checked"<#rt/> <#if itemKey??>
[2/2] struts git commit: radio checked fix vol.2
radio checked fix vol.2 (cherry picked from commit f7364a50dc6a82b51a57dab9b3efd6303e2295b6) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9de0cf4c Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9de0cf4c Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9de0cf4c Branch: refs/heads/support-2-3 Commit: 9de0cf4c8be123d110ce9e9caea0a077a9202264 Parents: 5cf4aac Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:52:23 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:52:53 2016 +0200 -- core/src/main/resources/template/simple/radiomap.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/9de0cf4c/core/src/main/resources/template/simple/radiomap.ftl -- diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index 12c41f9..07e987a 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -65,7 +65,7 @@ name="${parameters.name?html}"<#rt/> id="${parameters.id?html}${itemKeyStr?html}"<#rt/> -<#if tag.contains(parameters.nameValue, itemKey)> +<#if tag.contains(parameters.nameValue!'', itemKey)> checked="checked"<#rt/> <#if itemKey??>
[1/3] struts git commit: WW-4586 Custom StrutsTypeConverter's convertToString not called in radio and checkboxlist tags
Repository: struts Updated Branches: refs/heads/support-2-3 c714d2674 -> 5cf4aacd5 WW-4586 Custom StrutsTypeConverter's convertToString not called in radio and checkboxlist tags (cherry picked from commit 7a0ae0ebae8fe4deddc93bbfb4a76dbe09cefc77) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6ac2a58d Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6ac2a58d Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6ac2a58d Branch: refs/heads/support-2-3 Commit: 6ac2a58da7cb02d5b5af72e06377a46f832c6bb7 Parents: c714d26 Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:37:51 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:46:23 2016 +0200 -- core/src/main/resources/template/simple/checkboxlist.ftl | 3 ++- core/src/main/resources/template/simple/radiomap.ftl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/6ac2a58d/core/src/main/resources/template/simple/checkboxlist.ftl -- diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl index d50a98f..c3788dc 100644 --- a/core/src/main/resources/template/simple/checkboxlist.ftl +++ b/core/src/main/resources/template/simple/checkboxlist.ftl @@ -26,8 +26,10 @@ <#assign itemCount = itemCount + 1/> <#if parameters.listKey??> <#assign itemKey = stack.findValue(parameters.listKey)/> +<#assign itemKeyStr = stack.findString(parameters.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> +<#assign itemKeyStr = stack.findString('top')> <#if parameters.listLabelKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale @@ -59,7 +61,6 @@ <#assign itemTitle = ''/> -<#assign itemKeyStr=itemKey.toString() /> <#if parameters.id?has_content> id="${parameters.id?html}-${itemCount}"<#rt/> http://git-wip-us.apache.org/repos/asf/struts/blob/6ac2a58d/core/src/main/resources/template/simple/radiomap.ftl -- diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index 9160e05..37c3f59 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -23,10 +23,11 @@ <@s.iterator value="parameters.list"> <#if parameters.listKey??> <#assign itemKey = stack.findValue(parameters.listKey)/> +<#assign itemKeyStr = stack.findString(parameters.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> +<#assign itemKeyStr = stack.findString('top')> -<#assign itemKeyStr = itemKey.toString() /> <#if parameters.listValueKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale file for it's localized value. This is then used as a label -->
[3/3] struts git commit: radio checked fix
radio checked fix (cherry picked from commit 866b8902cd62dfdc9245b6dbb76e0f4fff818b4d) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5cf4aacd Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5cf4aacd Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5cf4aacd Branch: refs/heads/support-2-3 Commit: 5cf4aacd50068365f1fc59fc49f73c1620a5eb4c Parents: d82289a Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:43:07 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:47:00 2016 +0200 -- core/src/main/resources/template/simple/radiomap.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/5cf4aacd/core/src/main/resources/template/simple/radiomap.ftl -- diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index 37c3f59..12c41f9 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -65,7 +65,7 @@ name="${parameters.name?html}"<#rt/> id="${parameters.id?html}${itemKeyStr?html}"<#rt/> -<#if tag.contains(parameters.nameValue!'', itemKeyStr)> +<#if tag.contains(parameters.nameValue, itemKey)> checked="checked"<#rt/> <#if itemKey??>
[2/3] struts git commit: formatting
formatting (cherry picked from commit 820c52dd2689add4e59f3459c01a52bdd391e712) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d82289a1 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d82289a1 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d82289a1 Branch: refs/heads/support-2-3 Commit: d82289a1be3644e5da7fc9ce38f29daa11a42677 Parents: 6ac2a58 Author: Aleksandr MashchenkoAuthored: Fri Mar 4 20:39:58 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Mar 4 20:46:47 2016 +0200 -- core/src/main/resources/template/simple/checkboxlist.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/d82289a1/core/src/main/resources/template/simple/checkboxlist.ftl -- diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl index c3788dc..00ef282 100644 --- a/core/src/main/resources/template/simple/checkboxlist.ftl +++ b/core/src/main/resources/template/simple/checkboxlist.ftl @@ -27,9 +27,9 @@ <#if parameters.listKey??> <#assign itemKey = stack.findValue(parameters.listKey)/> <#assign itemKeyStr = stack.findString(parameters.listKey)/> -<#else> -<#assign itemKey = stack.findValue('top')/> -<#assign itemKeyStr = stack.findString('top')> +<#else> +<#assign itemKey = stack.findValue('top')/> +<#assign itemKeyStr = stack.findString('top')> <#if parameters.listLabelKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale
[2/2] struts git commit: WW-4630 - generates a value attribute for type=image which violates W3C (cherry picked from commit c4d2b687be8bdb454a11c5376bb475a8fa7f9c67)
WW-4630 - generates a value attribute for type=image which violates W3C (cherry picked from commit c4d2b687be8bdb454a11c5376bb475a8fa7f9c67â) Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/731fde54 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/731fde54 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/731fde54 Branch: refs/heads/support-2-3 Commit: 731fde544c00bcc3933a561848b81374939954aa Parents: 76eb8f3 Author: Aleksandr MashchenkoAuthored: Wed May 4 22:54:28 2016 +0300 Committer: Aleksandr Mashchenko Committed: Wed May 4 23:00:33 2016 +0300 -- core/src/main/resources/template/simple/submit.ftl | 6 +++--- .../test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Submit-1.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Submit-2.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Submit-5.txt | 2 +- .../resources/org/apache/struts2/views/jsp/ui/Submit-6.txt | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/731fde54/core/src/main/resources/template/simple/submit.ftl -- diff --git a/core/src/main/resources/template/simple/submit.ftl b/core/src/main/resources/template/simple/submit.ftl index 24db4a8..d77b5d0 100644 --- a/core/src/main/resources/template/simple/submit.ftl +++ b/core/src/main/resources/template/simple/submit.ftl @@ -61,6 +61,9 @@ <#else> +<#if parameters.nameValue?has_content> + value="<@s.property value="parameters.nameValue"/>"<#rt/> + <#if parameters.id?has_content> id="${parameters.id?html}"<#rt/> @@ -68,9 +71,6 @@ <#if parameters.name?has_content> name="${parameters.name?html}"<#rt/> -<#if parameters.nameValue?has_content> - value="<@s.property value="parameters.nameValue"/>"<#rt/> - <#if parameters.disabled!false> disabled="disabled"<#rt/> http://git-wip-us.apache.org/repos/asf/struts/blob/731fde54/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java -- diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java index 41f0cc5..c32fb0b 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java @@ -237,7 +237,7 @@ public class SubmitTest extends AbstractUITagTest { tag.doStartTag(); tag.doEndTag(); -assertEquals("", writer.toString().trim()); +assertEquals("", writer.toString().trim()); } /** http://git-wip-us.apache.org/repos/asf/struts/blob/731fde54/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt index 9057dd2..ac308d5 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt @@ -1,3 +1,3 @@ - + http://git-wip-us.apache.org/repos/asf/struts/blob/731fde54/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt index 42e7f1d..ce00b61 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt @@ -1,3 +1,3 @@ - + http://git-wip-us.apache.org/repos/asf/struts/blob/731fde54/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt index b55832d..f9ffb30 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt @@ -1,3 +1,3 @@ - + http://git-wip-us.apache.org/repos/asf/struts/blob/731fde54/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt
struts git commit: WW-4739 tag does not properly interpret the attribute tabindex
Repository: struts Updated Branches: refs/heads/master ad36c -> 533b236fd WW-4739 tag does not properly interpret the attribute tabindex Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/533b236f Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/533b236f Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/533b236f Branch: refs/heads/master Commit: 533b236fdbfb0df3a3b1ea459e88e69f1c3b3ec7 Parents: ad36777 Author: Aleksandr MashchenkoAuthored: Thu Feb 2 21:56:53 2017 +0200 Committer: Aleksandr Mashchenko Committed: Thu Feb 2 21:56:53 2017 +0200 -- core/src/main/resources/template/simple/reset.ftl | 6 ++ .../test/java/org/apache/struts2/views/jsp/ui/ResetTest.java | 2 ++ .../test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt | 2 +- .../test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/533b236f/core/src/main/resources/template/simple/reset.ftl -- diff --git a/core/src/main/resources/template/simple/reset.ftl b/core/src/main/resources/template/simple/reset.ftl index 7e7481f..67d6505 100644 --- a/core/src/main/resources/template/simple/reset.ftl +++ b/core/src/main/resources/template/simple/reset.ftl @@ -37,6 +37,9 @@ <#if parameters.disabled!false> disabled="disabled"<#rt/> +<#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex?html}"<#rt/> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl"/> <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> @@ -69,6 +72,9 @@ <#if parameters.disabled!false> disabled="disabled"<#rt/> +<#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex?html}"<#rt/> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> http://git-wip-us.apache.org/repos/asf/struts/blob/533b236f/core/src/test/java/org/apache/struts2/views/jsp/ui/ResetTest.java -- diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/ResetTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/ResetTest.java index 913ead8..6db4adf 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/ResetTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/ResetTest.java @@ -59,6 +59,7 @@ public class ResetTest extends AbstractUITagTest { tag.setLabel("mylabel"); tag.setName("myname"); tag.setValue("%{foo}"); +tag.setTabindex("1"); tag.doStartTag(); tag.doEndTag(); @@ -75,6 +76,7 @@ public class ResetTest extends AbstractUITagTest { tag.setType("button"); tag.setName("myname"); tag.setValue("%{foo}"); +tag.setTabindex("1"); tag.doStartTag(); tag.doEndTag(); http://git-wip-us.apache.org/repos/asf/struts/blob/533b236f/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt index 699faf7..4d6b7fc 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt @@ -1,3 +1,3 @@ - + http://git-wip-us.apache.org/repos/asf/struts/blob/533b236f/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt index a9f63c0..f956573 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt @@ -1,3 +1,3 @@ -bar +bar
struts git commit: WW-4743 NPE in StrutsTilesContainerFactory when resource isn't found
Repository: struts Updated Branches: refs/heads/master f22873e12 -> a399932ae WW-4743 NPE in StrutsTilesContainerFactory when resource isn't found Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a399932a Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a399932a Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a399932a Branch: refs/heads/master Commit: a399932ae9903167d1ee647b141cc98fdf83ef6f Parents: f22873e Author: Aleksandr MashchenkoAuthored: Mon Feb 13 20:15:18 2017 +0200 Committer: Aleksandr Mashchenko Committed: Mon Feb 13 20:15:18 2017 +0200 -- .../org/apache/struts2/tiles/StrutsTilesContainerFactory.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/a399932a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java -- diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java index f1c8bbb..b7564a9 100644 --- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java +++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java @@ -190,9 +190,13 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory { resources.addAll(applicationContext.getResources(definition)); } +if (resources.contains(null)) { +LOG.warn("Some resources were not found. Definitions: {}. Found resources: {}", definitions, resources); +} + List filteredResources = new ArrayList<>(); for (ApplicationResource resource : resources) { -if (Locale.ROOT.equals(resource.getLocale())) { +if (resource != null && Locale.ROOT.equals(resource.getLocale())) { filteredResources.add(resource); } }
struts git commit: WW-4747 s:file generates input tag with "value" attribute
Repository: struts Updated Branches: refs/heads/master 26fa06b11 -> f487d7e7d WW-4747 s:file generates input tag with "value" attribute Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f487d7e7 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f487d7e7 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f487d7e7 Branch: refs/heads/master Commit: f487d7e7d69c767949a59f36ceb5a45d96eb32dd Parents: 26fa06b Author: Aleksandr MashchenkoAuthored: Mon Feb 27 22:42:46 2017 +0200 Committer: Aleksandr Mashchenko Committed: Mon Feb 27 22:42:46 2017 +0200 -- core/src/main/resources/template/simple/file.ftl | 1 - core/src/test/java/org/apache/struts2/views/jsp/ui/FileTest.java | 2 +- core/src/test/resources/org/apache/struts2/views/jsp/ui/File-1.txt | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/f487d7e7/core/src/main/resources/template/simple/file.ftl -- diff --git a/core/src/main/resources/template/simple/file.ftl b/core/src/main/resources/template/simple/file.ftl index f0a1140..9e7a380 100644 --- a/core/src/main/resources/template/simple/file.ftl +++ b/core/src/main/resources/template/simple/file.ftl @@ -25,7 +25,6 @@ <#if parameters.get("size")?has_content> size="${parameters.get("size")?html}"<#rt/> - value=""<#rt/> <#if parameters.disabled!false> disabled="disabled"<#rt/> http://git-wip-us.apache.org/repos/asf/struts/blob/f487d7e7/core/src/test/java/org/apache/struts2/views/jsp/ui/FileTest.java -- diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/FileTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/FileTest.java index bd316f6..ad709e9 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/FileTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/FileTest.java @@ -66,7 +66,7 @@ public class FileTest extends AbstractUITagTest { Map result = super.initializedGenericTagTestProperties(); new PropertyHolder("accept", "someAccepted").addToMap(result); new PropertyHolder("size", "101").addToMap(result); - new PropertyHolder("value", "").addToMap(result); +new PropertyHolder("value", "", "").addToMap(result); return result; } http://git-wip-us.apache.org/repos/asf/struts/blob/f487d7e7/core/src/test/resources/org/apache/struts2/views/jsp/ui/File-1.txt -- diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/File-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/File-1.txt index 124c221..acfeb26 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/File-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/File-1.txt @@ -1,4 +1,4 @@ mylabel: - +
struts git commit: Fix import for deprecated JUnit Assert
Repository: struts Updated Branches: refs/heads/master 366366cdd -> a5817fecb Fix import for deprecated JUnit Assert Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a5817fec Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a5817fec Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a5817fec Branch: refs/heads/master Commit: a5817fecb3af8bbee6f254e1c249e08e4cc82388 Parents: 366366c Author: Aleksandr MashchenkoAuthored: Fri Nov 11 23:15:16 2016 +0200 Committer: Aleksandr Mashchenko Committed: Fri Nov 11 23:15:16 2016 +0200 -- .../main/java/com/opensymphony/xwork2/mock/MockInterceptor.java| 2 +- core/src/test/java/com/opensymphony/xwork2/NestedAction.java | 2 +- core/src/test/java/com/opensymphony/xwork2/TestInterceptor.java| 2 +- .../config/providers/XmlConfigurationProviderMultilevelTest.java | 2 +- .../opensymphony/xwork2/interceptor/ParametersInterceptorTest.java | 2 +- .../opensymphony/xwork2/interceptor/ValidationErrorAwareTest.java | 2 +- core/src/test/java/org/apache/struts2/TestResult.java | 2 +- .../struts2/dispatcher/ServletDispatchedTestAssertInterceptor.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/a5817fec/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java index c244770..691fcf6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java +++ b/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java @@ -17,7 +17,7 @@ package com.opensymphony.xwork2.mock; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.Interceptor; -import junit.framework.Assert; +import org.junit.Assert; /** http://git-wip-us.apache.org/repos/asf/struts/blob/a5817fec/core/src/test/java/com/opensymphony/xwork2/NestedAction.java -- diff --git a/core/src/test/java/com/opensymphony/xwork2/NestedAction.java b/core/src/test/java/com/opensymphony/xwork2/NestedAction.java index 5d743f2..342d864 100644 --- a/core/src/test/java/com/opensymphony/xwork2/NestedAction.java +++ b/core/src/test/java/com/opensymphony/xwork2/NestedAction.java @@ -16,7 +16,7 @@ package com.opensymphony.xwork2; import com.opensymphony.xwork2.util.ValueStack; -import junit.framework.Assert; +import org.junit.Assert; /** http://git-wip-us.apache.org/repos/asf/struts/blob/a5817fec/core/src/test/java/com/opensymphony/xwork2/TestInterceptor.java -- diff --git a/core/src/test/java/com/opensymphony/xwork2/TestInterceptor.java b/core/src/test/java/com/opensymphony/xwork2/TestInterceptor.java index fb71a06..86f678e 100644 --- a/core/src/test/java/com/opensymphony/xwork2/TestInterceptor.java +++ b/core/src/test/java/com/opensymphony/xwork2/TestInterceptor.java @@ -16,7 +16,7 @@ package com.opensymphony.xwork2; import com.opensymphony.xwork2.interceptor.Interceptor; -import junit.framework.Assert; +import org.junit.Assert; /** http://git-wip-us.apache.org/repos/asf/struts/blob/a5817fec/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderMultilevelTest.java -- diff --git a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderMultilevelTest.java b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderMultilevelTest.java index dcf6b69..43a05e6 100644 --- a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderMultilevelTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderMultilevelTest.java @@ -22,7 +22,7 @@ import com.opensymphony.xwork2.config.entities.InterceptorMapping; import com.opensymphony.xwork2.config.entities.PackageConfig; import com.opensymphony.xwork2.config.entities.ResultConfig; import com.opensymphony.xwork2.interceptor.ParametersInterceptor; -import junit.framework.Assert; +import org.junit.Assert; /** http://git-wip-us.apache.org/repos/asf/struts/blob/a5817fec/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java -- diff --git a/core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
struts git commit: WW-4705 - Add support for long type to tag
Repository: struts Updated Branches: refs/heads/master 8699f639f -> 8fe2bb831 WW-4705 - Add support for long type to tag Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/8fe2bb83 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/8fe2bb83 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/8fe2bb83 Branch: refs/heads/master Commit: 8fe2bb8317088f6a24aea3a03f19a9f257cbec09 Parents: 8699f63 Author: Aleksandr MashchenkoAuthored: Tue Nov 1 19:01:44 2016 +0200 Committer: Aleksandr Mashchenko Committed: Tue Nov 1 19:01:44 2016 +0200 -- .../java/org/apache/struts2/components/Date.java | 8 +--- .../org/apache/struts2/views/jsp/ui/DateTagTest.java | 15 +++ 2 files changed, 20 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/8fe2bb83/core/src/main/java/org/apache/struts2/components/Date.java -- diff --git a/core/src/main/java/org/apache/struts2/components/Date.java b/core/src/main/java/org/apache/struts2/components/Date.java index 3c89ce4..ac3d68b 100644 --- a/core/src/main/java/org/apache/struts2/components/Date.java +++ b/core/src/main/java/org/apache/struts2/components/Date.java @@ -288,8 +288,10 @@ public class Date extends ContextBean { Object dateObject = findValue(name); if (dateObject instanceof java.util.Date) { date = (java.util.Date) dateObject; -} else if(dateObject instanceof Calendar){ +} else if (dateObject instanceof Calendar) { date = ((Calendar) dateObject).getTime(); +} else if (dateObject instanceof Long) { +date = new java.util.Date((long) dateObject); } else { if (devMode) { String developerNotification = LocalizedTextUtil.findText( @@ -299,12 +301,12 @@ public class Date extends ContextBean { "Developer Notification:\n{0}", new Object[]{ "Expression [" + name + "] passed to tag which was evaluated to [" + dateObject + "](" -+ (dateObject != null ? dateObject.getClass() : "null") + ") isn't instance of java.util.Date nor java.util.Calendar!" ++ (dateObject != null ? dateObject.getClass() : "null") + ") isn't instance of java.util.Date nor java.util.Calendar nor long!" } ); LOG.warn(developerNotification); } else { -LOG.debug("Expression [{}] passed to tag which was evaluated to [{}]({}) isn't instance of java.util.Date nor java.util.Calendar!", +LOG.debug("Expression [{}] passed to tag which was evaluated to [{}]({}) isn't instance of java.util.Date nor java.util.Calendar nor long!", name, dateObject, (dateObject != null ? dateObject.getClass() : "null")); } } http://git-wip-us.apache.org/repos/asf/struts/blob/8fe2bb83/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java -- diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java index 27c6a0d..cc5b7a7 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTagTest.java @@ -102,6 +102,21 @@ public class DateTagTest extends AbstractTagTest { assertEquals(formatted, writer.toString()); } +public void testCustomFormatLong() throws Exception { +String format = "/MM/dd hh:mm:ss"; +Date date = new Date(); +String formatted = new SimpleDateFormat(format).format(date); +// long +context.put("myDate", date.getTime()); + +tag.setName("myDate"); +tag.setNice(false); +tag.setFormat(format); +tag.doStartTag(); +tag.doEndTag(); +assertEquals(formatted, writer.toString()); +} + public void testDefaultFormat() throws Exception { Date now = new Date(); String formatted = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM,
[2/2] struts git commit: WW-4748 Upgrade commons-lang3 to 3.5
WW-4748 Upgrade commons-lang3 to 3.5 Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/c83e07ec Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c83e07ec Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c83e07ec Branch: refs/heads/master Commit: c83e07ec4605de7169ab7c87d152f0ee9a790fac Parents: d7069fc Author: Aleksandr MashchenkoAuthored: Thu Mar 16 19:53:33 2017 +0200 Committer: Aleksandr Mashchenko Committed: Thu Mar 16 19:53:33 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/c83e07ec/pom.xml -- diff --git a/pom.xml b/pom.xml index 2468969..70d4150 100644 --- a/pom.xml +++ b/pom.xml @@ -718,7 +718,7 @@ org.apache.commons commons-lang3 -3.4 +3.5 commons-digester
struts git commit: WW-4761 Improve error logging in DefaultDispatcherErrorHandler
Repository: struts Updated Branches: refs/heads/master c83e07ec4 -> 6dcff10a6 WW-4761 Improve error logging in DefaultDispatcherErrorHandler Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6dcff10a Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6dcff10a Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6dcff10a Branch: refs/heads/master Commit: 6dcff10a68683a5ffd8f5605d87afd97a231bba2 Parents: c83e07e Author: Aleksandr MashchenkoAuthored: Thu Mar 16 20:16:06 2017 +0200 Committer: Aleksandr Mashchenko Committed: Thu Mar 16 20:16:06 2017 +0200 -- .../apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/6dcff10a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java index 4abb23f..2bf7c9f 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java @@ -66,7 +66,7 @@ public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler { // WW-1977: Only put errors in the request when code is a 500 error if (code == HttpServletResponse.SC_INTERNAL_SERVER_ERROR) { // WW-4103: Only logs error when application error occurred, not Struts error -LOG.error("Exception occurred during processing request: {}", e, e.getMessage()); +LOG.error("Exception occurred during processing request: {}", e.getMessage(), e); // send a http error response to use the servlet defined error handler // make the exception available to the web.xml defined error page request.setAttribute("javax.servlet.error.exception", e); @@ -83,7 +83,7 @@ public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler { } protected void handleErrorInDevMode(HttpServletResponse response, int code, Exception e) { -LOG.debug("Exception occurred during processing request: {}", e, e.getMessage()); +LOG.debug("Exception occurred during processing request: {}", e.getMessage(), e); try { List chain = new ArrayList<>(); Throwable cur = e;
struts git commit: WW-4788 Parameters which are added via ServletDispatcherResult aren't availabe in #parameters
Repository: struts Updated Branches: refs/heads/master b465791dc -> d8284846d WW-4788 Parameters which are added via ServletDispatcherResult aren't availabe in #parameters Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d8284846 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d8284846 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d8284846 Branch: refs/heads/master Commit: d8284846db6d761ec456d6b495451efa684326ce Parents: b465791 Author: Aleksandr MashchenkoAuthored: Sat Apr 22 12:15:00 2017 +0300 Committer: Aleksandr Mashchenko Committed: Sat Apr 22 12:15:00 2017 +0300 -- .../java/org/apache/struts2/result/ServletDispatcherResult.java| 2 ++ .../org/apache/struts2/result/ServletDispatcherResultTest.java | 2 ++ 2 files changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts/blob/d8284846/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java -- diff --git a/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java b/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java index c3f7125..3322c64 100644 --- a/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java +++ b/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java @@ -148,6 +148,8 @@ public class ServletDispatcherResult extends StrutsResultSupport { if (queryParams != null && !queryParams.isEmpty()) { parameters = HttpParameters.create(queryParams).withParent(parameters).build(); invocation.getInvocationContext().setParameters(parameters); +// put to extraContext, see Dispatcher#createContextMap + invocation.getInvocationContext().getContextMap().put("parameters", parameters); } } http://git-wip-us.apache.org/repos/asf/struts/blob/d8284846/core/src/test/java/org/apache/struts2/result/ServletDispatcherResultTest.java -- diff --git a/core/src/test/java/org/apache/struts2/result/ServletDispatcherResultTest.java b/core/src/test/java/org/apache/struts2/result/ServletDispatcherResultTest.java index f2826b6..baabf29 100644 --- a/core/src/test/java/org/apache/struts2/result/ServletDispatcherResultTest.java +++ b/core/src/test/java/org/apache/struts2/result/ServletDispatcherResultTest.java @@ -33,6 +33,7 @@ import ognl.Ognl; import org.apache.struts2.ServletActionContext; import org.apache.struts2.StrutsInternalTestCase; import org.apache.struts2.StrutsStatics; +import org.apache.struts2.dispatcher.HttpParameters; import com.mockobjects.dynamic.C; import com.mockobjects.dynamic.Mock; @@ -148,6 +149,7 @@ public class ServletDispatcherResultTest extends StrutsInternalTestCase implemen assertTrue(mockActionInvocation.getInvocationContext().getParameters().contains("bar")); assertEquals("1", mockActionInvocation.getInvocationContext().getParameters().get("bar").getValue()); +assertEquals("1", ((HttpParameters) mockActionInvocation.getInvocationContext().getContextMap().get("parameters")).get("bar").getValue()); dispatcherMock.verify(); requestMock.verify(); dispatcherMock.verify();
[5/5] struts-archetypes git commit: update maven-compiler-plugin
update maven-compiler-plugin Project: http://git-wip-us.apache.org/repos/asf/struts-archetypes/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-archetypes/commit/396cc66d Tree: http://git-wip-us.apache.org/repos/asf/struts-archetypes/tree/396cc66d Diff: http://git-wip-us.apache.org/repos/asf/struts-archetypes/diff/396cc66d Branch: refs/heads/master Commit: 396cc66d444ab0295ece1eacb6c1812312f3f5fe Parents: ebb8df0 Author: Aleksandr MashchenkoAuthored: Fri Jul 14 20:20:16 2017 +0300 Committer: Aleksandr Mashchenko Committed: Fri Jul 14 20:20:16 2017 +0300 -- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 1 + .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/396cc66d/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml index b8150f5..a1b2f65 100644 --- a/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml @@ -74,7 +74,7 @@ org.apache.maven.plugins maven-compiler-plugin -3.3 +3.6.1 UTF-8 1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/396cc66d/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml index add4191..6900b64 100644 --- a/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml @@ -61,7 +61,7 @@ maven-compiler-plugin -3.3 +3.6.1 UTF-8 1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/396cc66d/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml index 39c73dd..461b9d2 100644 --- a/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml @@ -68,7 +68,7 @@ maven-compiler-plugin -3.3 +3.6.1 UTF-8 1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/396cc66d/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml index 159c452..a4068f1 100644 --- a/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml @@ -99,6 +99,7 @@ maven-compiler-plugin +3.6.1 1.7 1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/396cc66d/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml index 30263ba..ccd81f0 100644 --- a/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml @@ -14,7 +14,7 @@ ${supported.struts2.version} 2.0 -
[2/5] struts-archetypes git commit: fix tests
fix tests Project: http://git-wip-us.apache.org/repos/asf/struts-archetypes/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-archetypes/commit/de51ed9a Tree: http://git-wip-us.apache.org/repos/asf/struts-archetypes/tree/de51ed9a Diff: http://git-wip-us.apache.org/repos/asf/struts-archetypes/diff/de51ed9a Branch: refs/heads/master Commit: de51ed9a9fb6e191c76b82634094680af14e948e Parents: 7cfced2 Author: Aleksandr MashchenkoAuthored: Fri Jul 14 20:11:44 2017 +0300 Committer: Aleksandr Mashchenko Committed: Fri Jul 14 20:11:44 2017 +0300 -- .../src/test/java/example/HelloWorldTest.java | 2 ++ .../src/test/java/actions/HelloActionTest.java | 5 - 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/de51ed9a/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/HelloWorldTest.java -- diff --git a/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/HelloWorldTest.java b/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/HelloWorldTest.java index 28c0a4d..27397a9 100644 --- a/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/HelloWorldTest.java +++ b/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/HelloWorldTest.java @@ -21,6 +21,7 @@ package ${package}.example; +import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.StrutsTestCase; @@ -28,6 +29,7 @@ public class HelloWorldTest extends StrutsTestCase { public void testHelloWorld() throws Exception { HelloWorld hello_world = container.inject(HelloWorld.class); +ActionContext.getContext().getContainer().inject(hello_world); String result = hello_world.execute(); assertTrue("Expected a success result!", ActionSupport.SUCCESS.equals(result)); http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/de51ed9a/struts2-archetype-convention/src/main/resources/archetype-resources/src/test/java/actions/HelloActionTest.java -- diff --git a/struts2-archetype-convention/src/main/resources/archetype-resources/src/test/java/actions/HelloActionTest.java b/struts2-archetype-convention/src/main/resources/archetype-resources/src/test/java/actions/HelloActionTest.java index 91c508e..8b83735 100644 --- a/struts2-archetype-convention/src/main/resources/archetype-resources/src/test/java/actions/HelloActionTest.java +++ b/struts2-archetype-convention/src/main/resources/archetype-resources/src/test/java/actions/HelloActionTest.java @@ -1,12 +1,15 @@ package ${package}.actions; -import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.StrutsTestCase; +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.ActionSupport; + public class HelloActionTest extends StrutsTestCase { public void testHelloAction() throws Exception { HelloAction hello = new HelloAction(); +ActionContext.getContext().getContainer().inject(hello); String result = hello.execute(); assertTrue("Expected a success result!", ActionSupport.SUCCESS.equals(result));
[1/5] struts-archetypes git commit: WW-4816 Archetypes: update source and target settings to 1.7
Repository: struts-archetypes Updated Branches: refs/heads/master a691a13b7 -> 396cc66d4 WW-4816 Archetypes: update source and target settings to 1.7 Project: http://git-wip-us.apache.org/repos/asf/struts-archetypes/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-archetypes/commit/7cfced21 Tree: http://git-wip-us.apache.org/repos/asf/struts-archetypes/tree/7cfced21 Diff: http://git-wip-us.apache.org/repos/asf/struts-archetypes/diff/7cfced21 Branch: refs/heads/master Commit: 7cfced21da6f25bef716c500da68046d8550b020 Parents: a691a13 Author: Aleksandr MashchenkoAuthored: Fri Jul 14 20:11:20 2017 +0300 Committer: Aleksandr Mashchenko Committed: Fri Jul 14 20:11:20 2017 +0300 -- .../src/main/resources/archetype-resources/pom.xml | 4 ++-- .../src/main/resources/archetype-resources/pom.xml | 4 ++-- .../src/main/resources/archetype-resources/pom.xml | 4 ++-- .../src/main/resources/archetype-resources/pom.xml | 4 ++-- .../src/main/resources/archetype-resources/pom.xml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/7cfced21/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml index 7694190..408abcf 100644 --- a/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml @@ -64,8 +64,8 @@ 3.3 UTF-8 -1.5 -1.5 +1.7 +1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/7cfced21/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml index ffbfd61..703ac3e 100644 --- a/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml @@ -71,8 +71,8 @@ 3.3 UTF-8 -1.5 -1.5 +1.7 +1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/7cfced21/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml index 8fa84a7..0439fcb 100644 --- a/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml @@ -100,8 +100,8 @@ maven-compiler-plugin -1.5 -1.5 +1.7 +1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/7cfced21/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml index ece9bca..30263ba 100644 --- a/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml @@ -50,8 +50,8 @@ maven-compiler-plugin ${plugin.compiler.version} -1.6 -1.6 +1.7 +1.7 http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/7cfced21/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml index f0f8f24..89b5905 100644 ---
[4/5] struts-archetypes git commit: update junit dependency
update junit dependency Project: http://git-wip-us.apache.org/repos/asf/struts-archetypes/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-archetypes/commit/ebb8df05 Tree: http://git-wip-us.apache.org/repos/asf/struts-archetypes/tree/ebb8df05 Diff: http://git-wip-us.apache.org/repos/asf/struts-archetypes/diff/ebb8df05 Branch: refs/heads/master Commit: ebb8df05033cc202cf4d9510e3d4f10ee420ebe7 Parents: 1f4282e Author: Aleksandr MashchenkoAuthored: Fri Jul 14 20:15:42 2017 +0300 Committer: Aleksandr Mashchenko Committed: Fri Jul 14 20:15:42 2017 +0300 -- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/ebb8df05/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml index da81dbd..b8150f5 100644 --- a/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml @@ -49,7 +49,7 @@ junit junit -4.5 +4.12 test http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/ebb8df05/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml index 408abcf..add4191 100644 --- a/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml @@ -37,7 +37,7 @@ junit junit -4.5 +4.12 test http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/ebb8df05/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml index 703ac3e..39c73dd 100644 --- a/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml @@ -43,7 +43,7 @@ junit junit -4.5 +4.12 test http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/ebb8df05/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml index 0439fcb..159c452 100644 --- a/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml @@ -21,7 +21,7 @@ junit junit -3.8.1 +4.12 test http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/ebb8df05/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml index d3f78c6..65b71da 100644 --- a/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml @@ -27,7 +27,7 @@ junit junit -3.8.1 +4.12 test http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/ebb8df05/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml --
[3/5] struts-archetypes git commit: update archetype-starter pom
update archetype-starter pom Project: http://git-wip-us.apache.org/repos/asf/struts-archetypes/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-archetypes/commit/1f4282e0 Tree: http://git-wip-us.apache.org/repos/asf/struts-archetypes/tree/1f4282e0 Diff: http://git-wip-us.apache.org/repos/asf/struts-archetypes/diff/1f4282e0 Branch: refs/heads/master Commit: 1f4282e051468b24c7b5abbfd643492a8cfe89e2 Parents: de51ed9 Author: Aleksandr MashchenkoAuthored: Fri Jul 14 20:12:15 2017 +0300 Committer: Aleksandr Mashchenko Committed: Fri Jul 14 20:12:15 2017 +0300 -- .../src/main/resources/archetype-resources/pom.xml| 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-archetypes/blob/1f4282e0/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml -- diff --git a/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml b/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml index 89b5905..e68062e 100644 --- a/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml +++ b/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml @@ -1,6 +1,7 @@ - +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 \${groupId} \${artifactId} @@ -113,13 +114,6 @@ \${basedir}/src/main/webapp/WEB-INF/web.xml - - -log4j -log4j -1.2.17 - -
struts git commit: WW-4823 Remove jQuery from debugging interceptor views
Repository: struts Updated Branches: refs/heads/master 856cb5fbe -> 6e6c4d8d6 WW-4823 Remove jQuery from debugging interceptor views Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6e6c4d8d Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6e6c4d8d Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6e6c4d8d Branch: refs/heads/master Commit: 6e6c4d8d6522213c14f040e56ac21a5b9f400308 Parents: 856cb5f Author: Aleksandr MashchenkoAuthored: Thu Jul 20 20:48:56 2017 +0300 Committer: Aleksandr Mashchenko Committed: Thu Jul 20 20:48:56 2017 +0300 -- .../struts2/interceptor/debugging/browser.ftl | 40 .../interceptor/debugging/webconsole.html | 11 +++--- .../struts2/interceptor/debugging/webconsole.js | 18 +++-- 3 files changed, 44 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/6e6c4d8d/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl -- diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl b/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl index 87175ce..8b1b3cb 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl @@ -54,7 +54,6 @@ } - function expand(src, path) { var baseUrl = location.href; @@ -62,24 +61,33 @@ baseUrl = (i > 0 ? baseUrl.substring(0, i) : baseUrl) + "&object=" + path; if (baseUrl.indexOf("decorate") < 0) { baseUrl += "&decorate=false"; - } - jQuery.get(baseUrl, function(data) { - var div = document.createElement("div"); - div.innerHTML = data; - src.parentNode.appendChild(div); - - src.innerHTML = "Collapse"; - var oldonclick = src.onclick; - src.onclick = function() { -src.innerHTML = "Expand"; -src.parentNode.removeChild(div); -src.onclick = oldonclick; - }; - }); + } + + var request = new XMLHttpRequest(); + request.open('GET', baseUrl, true); + request.onreadystatechange = function() { +if (this.readyState === 4) { + if (this.status >= 200 && this.status < 400) { +var div = document.createElement("div"); +console.log(this.responseText); +div.innerHTML = this.responseText; +src.parentNode.appendChild(div); + +src.innerHTML = "Collapse"; +var oldonclick = src.onclick; +src.onclick = function() { + src.innerHTML = "Expand"; + src.parentNode.removeChild(div); + src.onclick = oldonclick; +}; + } +} + }; + request.send(); } ${debugHtml} - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/struts/blob/6e6c4d8d/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html -- diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html index 9674c03..bb9e389 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html @@ -24,18 +24,17 @@ - OGNL Console + +Welcome to the OGNL console! + +:- + - - Welcome to the OGNL console! - - :- - http://git-wip-us.apache.org/repos/asf/struts/blob/6e6c4d8d/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.js -- diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.js b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.js index 2068e61..103c949 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.js +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.js @@ -48,9 +48,21 @@ function keyEvent(event, url) { commandsHistory[commandsHistory.length] = theShellCommand; historyPointer =
struts git commit: improve ParametersInterceptor logging
Repository: struts Updated Branches: refs/heads/master 6e6c4d8d6 -> 6d82cdb49 improve ParametersInterceptor logging Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6d82cdb4 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6d82cdb4 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6d82cdb4 Branch: refs/heads/master Commit: 6d82cdb4912fb82dca895599f3fbb0399a66132d Parents: 6e6c4d8 Author: Aleksandr MashchenkoAuthored: Thu Jul 20 23:34:58 2017 +0300 Committer: Aleksandr Mashchenko Committed: Thu Jul 20 23:34:58 2017 +0300 -- .../com/opensymphony/xwork2/interceptor/ParametersInterceptor.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/struts/blob/6d82cdb4/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java index 5eba95d..eeba993 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java +++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java @@ -271,6 +271,7 @@ public class ParametersInterceptor extends MethodFilterInterceptor { logEntry.append(String.valueOf(name)); logEntry.append(" => "); logEntry.append(parameters.get(name).getValue()); +logEntry.append(" "); } return logEntry.toString();
struts-site git commit: update security page
Repository: struts-site Updated Branches: refs/heads/master f2d8b61c3 -> 680619b02 update security page Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/680619b0 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/680619b0 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/680619b0 Branch: refs/heads/master Commit: 680619b02e33462732b1733d9ab1ab9b09d91027 Parents: f2d8b61 Author: Aleksandr MashchenkoAuthored: Thu Jun 15 23:58:36 2017 +0300 Committer: Aleksandr Mashchenko Committed: Thu Jun 15 23:58:36 2017 +0300 -- source/security/index.md | 276 +++--- 1 file changed, 68 insertions(+), 208 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/680619b0/source/security/index.md -- diff --git a/source/security/index.md b/source/security/index.md index 3d52c6c..fcd6e2c 100644 --- a/source/security/index.md +++ b/source/security/index.md @@ -6,53 +6,37 @@ title: Security (WIP) # Security -#Security tips# +### Security tips -The Apache Struts 2 doesn't provide any security mechanism \- it is just a pure web framework\. Below are few tips you should consider during application development with the Apache Struts 2\. +The Apache Struts 2 doesn't provide any security mechanism - it is just a pure web framework. Below are few tips you should consider during application development with the Apache Struts 2. -__Restrict access to the Config Browser__ + Restrict access to the Config Browser Plugin -_Config Browser Plugin_  exposes internal configuration and should be used only during development phase\. If you must use it on production site, we strictly recommend restricting access to it \- you can use  Basic Authentication or any other security mechanism (e\.g\. [Apache Shiro](http://shiro\.apache\.org/)^[http://shiro\.apache\.org/]) +[Config Browser Plugin](https://struts.apache.org/docs/config-browser-plugin.html) exposes internal configuration and should be used only during development phase. If you must use it on production site, we strictly recommend restricting access to it - you can use  Basic Authentication or any other security mechanism (e.g. [Apache Shiro](https://shiro.apache.org/)) -__Don't mix different access levels in the same namespace__ + Don't mix different access levels in the same namespace -Very often access to different resources is controlled based on URL patterns, see snippet below\. Because of that you cannot mix actions with different security levels in the same namespace\. Always group actions in one namespace by security level\. +Very often access to different resources is controlled based on URL patterns, see snippet below. Because of that you cannot mix actions with different security levels in the same namespace. Always group actions in one namespace by security level. -~~~ - - -admin -/secure/* - - -admin - - - -~~~ - -__Never expose JSP files directly__ - -You must always hide JSP file behind an action, you cannot allow for direct access to the JSP files as this can leads to unpredictable security vulnerabilities\. You can achieve this by putting all your JSP files under the - -~~~ -WEB-INF -~~~ - folder \- most of the JEE containers restrict access to files placed under the +```xml + + +admin +/secure/* + + +admin + + +``` -~~~ -WEB-INF -~~~ - folder\. Second option is to add security constraint to the + Never expose JSP files directly -~~~ -web.xml -~~~ - file: +You must always hide JSP file behind an action, you cannot allow for direct access to the JSP files as this can leads to unpredictable security vulnerabilities. You can achieve this by putting all your JSP files under the `WEB-INF` folder - most of the JEE containers restrict access to files placed under the `WEB-INF` folder. Second option is to add security constraint to the `web.xml` file: -~~~ +```xml No direct JSP access @@ -69,53 +53,29 @@ web.xml Don't assign users to this role no-users -~~~ +``` -The best approach is to used the both solutions\. +The best approach is to used the both solutions. -__Disable devMode__ + Disable devMode -The +The `devMode` is a very useful option during development time, allowing for deep introspection and debugging into you app. -~~~ -devMode -~~~ - is a very useful option during development time, allowing for deep introspection and debugging into you app\. +However, in production it
struts git commit: fix confusing debug message
Repository: struts Updated Branches: refs/heads/master 0100a6beb -> 843693fdd fix confusing debug message Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/843693fd Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/843693fd Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/843693fd Branch: refs/heads/master Commit: 843693fdd4e53347636872ab881c770e7cc3b6e0 Parents: 0100a6b Author: Aleksandr MashchenkoAuthored: Mon Jun 5 23:20:26 2017 +0300 Committer: Aleksandr Mashchenko Committed: Mon Jun 5 23:20:26 2017 +0300 -- .../java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/843693fd/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java index 530be65..234fb5b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java @@ -53,7 +53,7 @@ public class SecurityMemberAccess extends DefaultMemberAccess { @Override public boolean isAccessible(Map context, Object target, Member member, String propertyName) { -LOG.debug("Checking access for [target: {}, member: {}, property: {}] is deprecated!", target, member, propertyName); +LOG.debug("Checking access for [target: {}, member: {}, property: {}]", target, member, propertyName); if (checkEnumAccess(target, member)) { LOG.trace("Allowing access to enum: {}", target);
[struts-site] branch master updated: fix some result types pages
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new dc40157 fix some result types pages dc40157 is described below commit dc40157cdd11131126332cfabb82842a5f9daea0 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Fri Sep 22 23:07:30 2017 +0300 fix some result types pages --- source/core-developers/chain-result.md | 58 ++--- source/core-developers/dispatcher-result.md | 26 +++-- source/core-developers/freemarker-result.md | 58 ++--- source/core-developers/httpheader-result.md | 32 ++-- source/core-developers/result-types.md | 2 +- 5 files changed, 82 insertions(+), 94 deletions(-) diff --git a/source/core-developers/chain-result.md b/source/core-developers/chain-result.md index 4258ff4..4eec90d 100644 --- a/source/core-developers/chain-result.md +++ b/source/core-developers/chain-result.md @@ -5,25 +5,39 @@ title: Chain Result # Chain Result - - -~~~ -{snippet:id=description|javadoc=true|url=com.opensymphony.xwork2.ActionChainResult} -~~~ - -Parameters - - - -~~~ -{snippet:id=params|javadoc=true|url=com.opensymphony.xwork2.ActionChainResult} -~~~ - -Examples - - - -~~~ -{snippet:id=example|lang=xml|javadoc=true|url=com.opensymphony.xwork2.ActionChainResult} -~~~ - +This result invokes an entire other action, complete with it's own interceptor stack and result. + +### Parameters + +- `actionName` (default) - the name of the action that will be chained to. + +- `namespace` - used to determine which namespace the Action is in that we're chaining. If namespace is null, this defaults to the current namespace. + +- `method` - used to specify another method on target action to be invoked. If null, this defaults to execute method. + +- `skipActions` - (optional) the list of comma separated action names for the actions that could be chained to. + +### Examples + +``` + + + +login + + + + + +dashboard +/secure + + + + + + +dashboard.jsp + + +``` diff --git a/source/core-developers/dispatcher-result.md b/source/core-developers/dispatcher-result.md index f3f4279..371f768 100644 --- a/source/core-developers/dispatcher-result.md +++ b/source/core-developers/dispatcher-result.md @@ -5,24 +5,26 @@ title: Dispatcher Result # Dispatcher Result +Includes or forwards to a view (usually a jsp). Behind the scenes Struts will use a `RequestDispatcher`, where the target servlet/JSP receives the same request/response objects as the original servlet/JSP. Therefore, you can pass data between them using `request.setAttribute()` - the Struts action is available. +There are three possible ways the result can be executed: -~~~ -{snippet:id=description|javadoc=true|url=org.apache.struts2.result.ServletDispatcherResult} -~~~ +- If we are in the scope of a JSP (a PageContext is available), PageContext's `{@link PageContext#include(String) include}` method is called. -#Parameters# +- If there is no PageContext and we're not in any sort of include (there is no "javax.servlet.include.servlet_path" in the request attributes), then a call to `{@link RequestDispatcher#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) forward}` is made. +- Otherwise, `{@link RequestDispatcher#include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) include}` is called. + Parameters -~~~ -{snippet:id=params|javadoc=true|url=org.apache.struts2.result.ServletDispatcherResult} -~~~ +- `location` (default) - the location to go to after execution (ex. jsp). -#Examples# +- `parse` - true by default. If set to false, the location param will not be parsed for OGNL expressions. + Examples - -~~~ -{snippet:id=example|lang=xml|javadoc=true|url=org.apache.struts2.result.ServletDispatcherResult} -~~~ +``` + + foo.jsp + +``` diff --git a/source/core-developers/freemarker-result.md b/source/core-developers/freemarker-result.md index 1af5b44..d456eb4 100644 --- a/source/core-developers/freemarker-result.md +++ b/source/core-developers/freemarker-result.md @@ -5,63 +5,27 @@ title: FreeMarker Result # FreeMarker Result -Renders a view using the Freemarker template engine\. The +Renders a view using the Freemarker template engine. The `FreemarkarManager` class configures the template loaders so that the template location can be either -~~~ -FreemarkarManager -~~~ - class configures the template loaders so that the template location can be either +- relative to the web root folder, e.g.: `/WEB-INF/views/home.ftl` -+ relative to the web root folder, e\.g\.: +- a classpath resou
struts-site git commit: move "Edit on GitHub" link to the left so it is not overlaid with "Fork me on GitHub" link
Repository: struts-site Updated Branches: refs/heads/master 78f4b0243 -> 792955cfe move "Edit on GitHub" link to the left so it is not overlaid with "Fork me on GitHub" link Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/792955cf Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/792955cf Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/792955cf Branch: refs/heads/master Commit: 792955cfe7e8c8d8869e16f4324bb14050f395be Parents: 78f4b02 Author: Aleksandr MashchenkoAuthored: Thu Sep 14 23:03:12 2017 +0300 Committer: Aleksandr Mashchenko Committed: Thu Sep 14 23:03:12 2017 +0300 -- source/css/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/792955cf/source/css/custom.css -- diff --git a/source/css/custom.css b/source/css/custom.css index d8ee911..7a96649 100644 --- a/source/css/custom.css +++ b/source/css/custom.css @@ -35,7 +35,7 @@ a.anchor { a.edit-on-gh { position: absolute; - right: 0; + left: 0; top: 0; display: block;
struts-site git commit: fix some validators pages
Repository: struts-site Updated Branches: refs/heads/master b0896ba39 -> bf29f7abc fix some validators pages Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/bf29f7ab Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/bf29f7ab Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/bf29f7ab Branch: refs/heads/master Commit: bf29f7abc99a4d89556c787a65c45e42c31a171f Parents: b0896ba Author: Aleksandr MashchenkoAuthored: Mon Sep 11 00:29:55 2017 +0300 Committer: Aleksandr Mashchenko Committed: Mon Sep 11 00:29:55 2017 +0300 -- source/core-developers/conversion-validator.md | 134 --- source/core-developers/date-validator.md| 79 +++ source/core-developers/double-validator.md | 80 +++ source/core-developers/required-validator.md| 51 +++ .../core-developers/requiredstring-validator.md | 61 + 5 files changed, 252 insertions(+), 153 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/bf29f7ab/source/core-developers/conversion-validator.md -- diff --git a/source/core-developers/conversion-validator.md b/source/core-developers/conversion-validator.md index a28e6eb..f572fa1 100644 --- a/source/core-developers/conversion-validator.md +++ b/source/core-developers/conversion-validator.md @@ -5,54 +5,86 @@ title: conversion validator # conversion validator -Description - - - -~~~ -{snippet:id=javadoc|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ConversionErrorFieldValidator} -~~~ - -Parameters - - - -~~~ -{snippet:id=parameters|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ConversionErrorFieldValidator} -~~~ - -Examples - - - -~~~ -{snippet:id=example|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ConversionErrorFieldValidator} -~~~ - -Repopulating Field upon conversion Error - - - -~~~ -{snippet:id=javadoc|javadoc=true|url=com.opensymphony.xwork2.validator.validators.RepopulateConversionErrorFieldValidatorSupport} -~~~ - - -~~~ -{snippet:id=exampleJspPage|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.RepopulateConversionErrorFieldValidatorSupport} -~~~ - - -~~~ -{snippet:id=exampleXwork|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.RepopulateConversionErrorFieldValidatorSupport} -~~~ - - -~~~ -{snippet:id=exampleJava|lang=java|javadoc=true|url=com.opensymphony.xwork2.validator.validators.RepopulateConversionErrorFieldValidatorSupport} -~~~ - - -~~~ -{snippet:id=exampleValidation|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.RepopulateConversionErrorFieldValidatorSupport} -~~~ +### Description + +Field Validator that checks if a conversion error occurred for this field. + +### Parameters + +- `fieldName` - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required. + +### Examples + +``` + + +myField + Conversion Error Occurred + + + + + + Conversion Error Occurred + + +``` + +### Repopulating Field upon conversion Error + + The capability of auto-repopulating the stack with a fake parameter map when a conversion error has occurred can be done with `repopulateField` property set to `true`. + +This is typically useful when one wants to repopulate the field with the original value when a conversion error occurred. Eg. with a textfield that only allows an Integer (the action class have an Integer field declared), upon conversion error, the incorrectly entered integer (maybe a text 'one') will not appear when dispatched back. With `repopulateField` property set to true, it will, meaning the textfield will have 'one' as its value upon conversion error. + +``` + + + + + + + +``` + +``` + + + + + + + + myJspPage.jsp + success.jsp + + + + + +``` + +``` + +public class MyActionSupport extends ActionSupport { + private Integer myIntegerField; + + public Integer getMyIntegerField() { return this.myIntegerField; } + public void setMyIntegerField(Integer myIntegerField) { + this.myIntegerField = myIntegerField; + } +} +``` + +``` + + + ... + + +true +Conversion Error (Integer Wanted) + + + ... + +``` http://git-wip-us.apache.org/repos/asf/struts-site/blob/bf29f7ab/source/core-developers/date-validator.md -- diff --git a/source/core-developers/date-validator.md b/source/core-developers/date-validator.md index
struts-site git commit: fix validators pages
Repository: struts-site Updated Branches: refs/heads/master bf29f7abc -> e350c8983 fix validators pages Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/e350c898 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/e350c898 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/e350c898 Branch: refs/heads/master Commit: e350c8983569a3ed639ed978e6899b52c6e593b5 Parents: bf29f7a Author: Aleksandr MashchenkoAuthored: Mon Sep 11 00:46:45 2017 +0300 Committer: Aleksandr Mashchenko Committed: Mon Sep 11 00:46:45 2017 +0300 -- source/core-developers/date-validator.md | 4 +- source/core-developers/expression-validator.md | 31 - source/core-developers/int-validator.md| 77 + source/core-developers/required-validator.md | 1 - source/core-developers/url-validator.md| 23 +++--- 5 files changed, 73 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/e350c898/source/core-developers/date-validator.md -- diff --git a/source/core-developers/date-validator.md b/source/core-developers/date-validator.md index f8e0f3c..38db7e1 100644 --- a/source/core-developers/date-validator.md +++ b/source/core-developers/date-validator.md @@ -13,14 +13,14 @@ Field Validator that checks if the date supplied is within a specific range. ### Parameters -- `fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required. +- `fieldName` - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required. - `min` - the min date range. If not specified will not be checked. - `max` - the max date range. If not specified will not be checked. - `parse` - if set to true, minExpression and maxExpression will be evaluated to find min/max. - `minExpression` - expression to calculate the minimum value (if none is specified, it will not be checked). - `maxExpression` - expression to calculate the maximum value (if none is specified, it will not be checked). -You can either use the min / max value or minExpression / maxExpression (when parse is set to true) - using expression can be slightly slower, see the example below. +You can either use the `min` / `max` value or `minExpression` / `maxExpression` (when `parse` is set to `true`) - using expression can be slightly slower, see the example below. > Warning > Do not use `${minExpression}` and `${maxExpression}` as an expression as > this will turn into infinitive loop! http://git-wip-us.apache.org/repos/asf/struts-site/blob/e350c898/source/core-developers/expression-validator.md -- diff --git a/source/core-developers/expression-validator.md b/source/core-developers/expression-validator.md index bc2c803..6ab1a38 100644 --- a/source/core-developers/expression-validator.md +++ b/source/core-developers/expression-validator.md @@ -5,26 +5,21 @@ title: expression validator # expression validator -Description +### Description +A Non-Field Level validator that validates based on regular expression supplied. +### Parameters -~~~ -{snippet:id=javadoc|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ExpressionValidator} -~~~ +- `expression` - the Ognl expression to be evaluated against the stack (Must evaluate to a Boolean). -Parameters +### Examples - - -~~~ -{snippet:id=parameters|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ExpressionValidator} -~~~ - -Examples - - - -~~~ -{snippet:id=example|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ExpressionValidator} -~~~ +``` + + + + Failed to meet Ognl Expression + + +``` http://git-wip-us.apache.org/repos/asf/struts-site/blob/e350c898/source/core-developers/int-validator.md -- diff --git a/source/core-developers/int-validator.md b/source/core-developers/int-validator.md index 0a4d060..f50b1a9 100644 --- a/source/core-developers/int-validator.md +++ b/source/core-developers/int-validator.md @@ -5,31 +5,52 @@ title: int validator # int validator -Description - - - -~~~ -{snippet:id=javadoc|javadoc=true|url=com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator} -~~~ - -Parameters - - - -~~~ -{snippet:id=parameters|javadoc=true|url=com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator} -~~~ - -**(\!) Warning** - - ->
struts-site git commit: fix more validators pages
Repository: struts-site Updated Branches: refs/heads/master e350c8983 -> 271ed7b46 fix more validators pages Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/271ed7b4 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/271ed7b4 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/271ed7b4 Branch: refs/heads/master Commit: 271ed7b46a3d416e4ea5361bf6dc1491d41cb8e8 Parents: e350c89 Author: Aleksandr MashchenkoAuthored: Mon Sep 11 22:57:50 2017 +0300 Committer: Aleksandr Mashchenko Committed: Mon Sep 11 22:57:50 2017 +0300 -- .../conditionalvisitor-validator.md | 31 source/core-developers/email-validator.md | 79 +--- .../fieldexpression-validator.md| 53 +++-- source/core-developers/regex-validator.md | 74 +++--- source/core-developers/short-validator.md | 77 --- .../core-developers/stringlength-validator.md | 79 +--- source/core-developers/visitor-validator.md | 58 +++--- 7 files changed, 270 insertions(+), 181 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/271ed7b4/source/core-developers/conditionalvisitor-validator.md -- diff --git a/source/core-developers/conditionalvisitor-validator.md b/source/core-developers/conditionalvisitor-validator.md index 51db45f..13161cd 100644 --- a/source/core-developers/conditionalvisitor-validator.md +++ b/source/core-developers/conditionalvisitor-validator.md @@ -5,26 +5,21 @@ title: conditionalvisitor validator # conditionalvisitor validator -Description +### Description +The ConditionalVisitorFieldValidator will forward validation to the VisitorFieldValidator only if the expression will evaluate to true. +### Parameters -~~~ -{snippet:id=javadoc|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ConditionalVisitorFieldValidator} -~~~ +- `expression` - an OGNL expression which should evaluate to true to pass validation to the VisitorFieldValidator. -Parameters +### Examples - - -~~~ -{snippet:id=parameters|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ConditionalVisitorFieldValidator} -~~~ - -Examples - - - -~~~ -{snippet:id=example|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.ConditionalVisitorFieldValidator} -~~~ +``` + + +reason == 'colleague' and colleaguePositionID == 'OTHER' +You must select reason Colleague and position Other + + +``` http://git-wip-us.apache.org/repos/asf/struts-site/blob/271ed7b4/source/core-developers/email-validator.md -- diff --git a/source/core-developers/email-validator.md b/source/core-developers/email-validator.md index 590020e..4d5235b 100644 --- a/source/core-developers/email-validator.md +++ b/source/core-developers/email-validator.md @@ -5,31 +5,54 @@ title: email validator # email validator -Description - - - -~~~ -{snippet:id=javadoc|javadoc=true|url=com.opensymphony.xwork2.validator.validators.EmailValidator} -~~~ - -Parameters - - - -~~~ -{snippet:id=parameters|javadoc=true|url=com.opensymphony.xwork2.validator.validators.EmailValidator} -~~~ - -**(\!) Warning** - - -> \{snippet:id=parameters\-warning|javadoc=true|url=com\.opensymphony\.xwork2\.validator\.validators\.EmailValidator\} - -Examples - - - -~~~ -{snippet:id=example|lang=xml|javadoc=true|url=com.opensymphony.xwork2.validator.validators.EmailValidator} -~~~ +### Description + +EmailValidator checks that a given String field, if not empty, is a valid email address. + +The regular expression used to validate that the string is an email address is: + +``` +\\b^['_a-z0-9-\\+](\\.['_a-z0-9-\\+])@[a-z0-9-](\\.[a-z0-9-])\\.([a-z]{2,6})$\\b +``` + +You can also specify `expression`, `caseSensitive` and `trim` params as a OGNL expression, see the example below. + +### Parameters + +- `fieldName` - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required. + +Check also documentation of the `RegexpValidator` for more details - the EmailValidator is based on it. + +> Warning +> Do not use `${regexExpression}`, `${caseSensitiveExpression}` and `${trimExpression}` as an expression as this will turn into infinitive loop! + +### Examples + +``` + + + +myEmail +Must provide a valid email + + + + + + + Must provide a valid email + + + + + + + + ${emailPattern} + ${emailCaseSensitive} +
[struts-site] branch master updated: fix more result pages
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new cb4690f fix more result pages cb4690f is described below commit cb4690ffa36814ac3096ceb9cf7d0478c4bf1e56 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Wed Oct 4 22:58:31 2017 +0300 fix more result pages --- source/core-developers/httpheader-result.md | 2 +- source/core-developers/redirect-action-result.md | 103 +++--- source/core-developers/redirect-result.md| 32 --- source/core-developers/stream-result.md | 106 +-- 4 files changed, 111 insertions(+), 132 deletions(-) diff --git a/source/core-developers/httpheader-result.md b/source/core-developers/httpheader-result.md index 63c52e7..0fda09d 100644 --- a/source/core-developers/httpheader-result.md +++ b/source/core-developers/httpheader-result.md @@ -12,7 +12,7 @@ A custom Result type for setting HTTP headers and status by optionally evaluatin - `status` - the http servlet response status code that should be set on a response. -- `parse` - true by default. If set to false, the headers param will not be parsed for Ognl expressions. +- `parse` - true by default. If set to false, the headers param will not be parsed for OGNL expressions. - `headers` - header values. diff --git a/source/core-developers/redirect-action-result.md b/source/core-developers/redirect-action-result.md index d661b3a..b951575 100644 --- a/source/core-developers/redirect-action-result.md +++ b/source/core-developers/redirect-action-result.md @@ -5,47 +5,84 @@ title: Redirect Action Result # Redirect Action Result +This result uses the `ActionMapper` provided by the `ActionMapperFactory` to redirect the browser to a URL that invokes the specified action and (optional) namespace. This is better than the `ServletRedirectResult` because it does not require you to encode the URL patterns processed by the `ActionMapper` in to your struts.xml configuration files. This means you can change your URL patterns at any point and your application will still work. It is strongly recommended that if you are redir [...] - -{% snippet id=description|javadoc=true|url=org.apache.struts2.result.ServletActionRedirectResult %} - +See examples below for an example of how request parameters could be passed in. See [ActionMapper](action-mapper.html) for more details -| - -Parameters - - - -{% snippet id=params|javadoc=true|url=org.apache.struts2.result.ServletActionRedirectResult %} - -Examples - - -{% snippet id=example|lang=xml|javadoc=true|url=org.apache.struts2.result.ServletActionRedirectResult %} - - - -~~~ +### Parameters + +- `actionName` (default) - The name of the action that will be redirected to. +- `namespace` - Used to determine which namespace the action is in that we're redirecting to. If namespace is null, the default will be the current namespace. +- `suppressEmptyParameters` - Optional boolean (defaults to false) that can prevent parameters with no values from being included in the redirect URL. +- `parse` - Boolean, true by default. If set to false, the actionName param will not be parsed for OGNL expressions. +- `anchor` - Optional. Also known as "fragment" or colloquially as "hash". You can specify an anchor for a result. + +### Examples + +``` + + + + +dashboard +/secure + + + + + +<-- Redirect to an action in the same namespace --> + +dashboard.jsp +error + + + +error.jsp + + + + + + + + + generateReport + /genReport + pie + 100 + 100 + + true + summary + + + +``` + +``` - + - /jsp/displayReport.jsp +/jsp/displayReport.jsp - + - /jsp/index.jsp - - displayReport - false - SUMMARY - +/jsp/index.jsp + +displayReport +false +SUMMARY + - -~~~ +``` diff --git a/source/core-developers/redirect-result.md b/source/core-developers/redirect-result.md index b79469d..9461e8e 100644 --- a/source/core-developers/redirect-result.md +++ b/source/core-developers/redirect-result.md @@ -5,25 +5,34 @@ title: Redirect Result # Redirect Result +Calls the `{@link HttpServletResponse#sendRedirect(String) sendRedirect}` method to the location specified. The response is told to redirect the browser to the specified location (a new request from the client). The consequence of doing this means that the action (action instance, action errors, field errors, etc) that was just executed is lost and no longer available. Th
[struts-site] branch master updated: fix typo in jetty maven plugin version
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new a28deef fix typo in jetty maven plugin version a28deef is described below commit a28deef29f80567ef966af03bb284c8105fec87b Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Thu Oct 19 23:30:52 2017 +0300 fix typo in jetty maven plugin version --- source/getting-started/how-to-create-a-struts2-web-application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/getting-started/how-to-create-a-struts2-web-application.md b/source/getting-started/how-to-create-a-struts2-web-application.md index 5127f5b..8aba5e5 100644 --- a/source/getting-started/how-to-create-a-struts2-web-application.md +++ b/source/getting-started/how-to-create-a-struts2-web-application.md @@ -64,7 +64,7 @@ project folder structure. In your `pom.xml` include the following: org.eclipse.jetty jetty-maven-plugin -9.4.7.20170914 +9.4.7.v20170914 /${build.finalName} -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts] 01/01: Merge pull request #224 from sdutry/WW-4779
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit a86524e22adac1b17b954ba903daca6f42ee6b70 Merge: b2dcd87 38c3046 Author: Aleksandr Mashchenko <aleksand...@users.noreply.github.com> AuthorDate: Tue May 22 23:46:28 2018 +0300 Merge pull request #224 from sdutry/WW-4779 WW-4779 Remove profiling layer .../xwork2/DefaultActionInvocation.java| 128 ++ .../opensymphony/xwork2/DefaultActionProxy.java| 35 +- .../xwork2/interceptor/TimerInterceptor.java | 251 --- .../xwork2/util/profiling/ObjectProfiler.java | 177 .../xwork2/util/profiling/ProfilingTimerBean.java | 129 -- .../xwork2/util/profiling/UtilTimerStack.java | 492 - .../xwork2/util/profiling/package.html | 21 - .../org/apache/struts2/dispatcher/Dispatcher.java | 5 - .../ProfilingActivationInterceptor.java| 104 - core/src/main/resources/struts-default.xml | 2 - core/src/main/resources/xwork-default.xml | 1 - .../xwork2/config/ConfigurationTest.java | 4 +- .../XmlConfigurationProviderActionsTest.java | 6 +- ...onfigurationProviderInterceptorsSpringTest.java | 10 +- .../XmlConfigurationProviderInterceptorsTest.java | 28 +- .../xwork2/interceptor/TimerInterceptorTest.java | 163 --- .../xwork2/spring/SpringObjectFactoryTest.java | 8 +- .../util/profiling/ProfilingTimerBeanTest.java | 127 -- .../xwork2/util/profiling/UtilTimerStackTest.java | 136 -- .../xwork2/config/providers/xwork- test.xml| 4 +- .../xwork-test-actions-packagedefaultclassref.xml | 4 +- .../xwork2/config/providers/xwork-test-actions.xml | 4 +- .../xwork-test-interceptor-defaultref.xml | 4 +- .../xwork-test-interceptor-inheritance.xml | 4 +- .../providers/xwork-test-interceptor-params.xml| 4 +- .../providers/xwork-test-interceptors-basic.xml| 4 +- .../providers/xwork-test-interceptors-spring.xml | 2 +- core/src/test/resources/xwork-proxyinvoke.xml | 2 - core/src/test/resources/xwork-test-default.xml | 2 - core/src/test/resources/xwork-test-validation.xml | 2 - .../apache/struts2/rest/RestActionInvocation.java | 47 +- .../OldDecorator2NewStrutsFreemarkerDecorator.java | 5 - 32 files changed, 121 insertions(+), 1794 deletions(-) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch master updated (b2dcd87 -> a86524e)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from b2dcd87 Merge pull request #221 from yasserzamani/WW-4932 add 2ab4657 remove TimerInterceptor add 1045836 remove ObjectProfiler add 14c0f47 remove UtilTimerStack add 6c0d719 fix RestActionInvocation add db0f5b5 remove ProfilingTimerBean add 38c3046 further clean up after rmoving profiling layer new a86524e Merge pull request #224 from sdutry/WW-4779 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../xwork2/DefaultActionInvocation.java| 128 ++ .../opensymphony/xwork2/DefaultActionProxy.java| 35 +- .../xwork2/interceptor/TimerInterceptor.java | 251 --- .../xwork2/util/profiling/ObjectProfiler.java | 177 .../xwork2/util/profiling/ProfilingTimerBean.java | 129 -- .../xwork2/util/profiling/UtilTimerStack.java | 492 - .../xwork2/util/profiling/package.html | 21 - .../org/apache/struts2/dispatcher/Dispatcher.java | 5 - .../ProfilingActivationInterceptor.java| 104 - core/src/main/resources/struts-default.xml | 2 - core/src/main/resources/xwork-default.xml | 1 - .../xwork2/config/ConfigurationTest.java | 4 +- .../XmlConfigurationProviderActionsTest.java | 6 +- ...onfigurationProviderInterceptorsSpringTest.java | 10 +- .../XmlConfigurationProviderInterceptorsTest.java | 28 +- .../xwork2/interceptor/TimerInterceptorTest.java | 163 --- .../xwork2/spring/SpringObjectFactoryTest.java | 8 +- .../util/profiling/ProfilingTimerBeanTest.java | 127 -- .../xwork2/util/profiling/UtilTimerStackTest.java | 136 -- .../xwork2/config/providers/xwork- test.xml| 4 +- .../xwork-test-actions-packagedefaultclassref.xml | 4 +- .../xwork2/config/providers/xwork-test-actions.xml | 4 +- .../xwork-test-interceptor-defaultref.xml | 4 +- .../xwork-test-interceptor-inheritance.xml | 4 +- .../providers/xwork-test-interceptor-params.xml| 4 +- .../providers/xwork-test-interceptors-basic.xml| 4 +- .../providers/xwork-test-interceptors-spring.xml | 2 +- core/src/test/resources/xwork-proxyinvoke.xml | 2 - core/src/test/resources/xwork-test-default.xml | 2 - core/src/test/resources/xwork-test-validation.xml | 2 - .../apache/struts2/rest/RestActionInvocation.java | 47 +- .../OldDecorator2NewStrutsFreemarkerDecorator.java | 5 - 32 files changed, 121 insertions(+), 1794 deletions(-) delete mode 100644 core/src/main/java/com/opensymphony/xwork2/interceptor/TimerInterceptor.java delete mode 100644 core/src/main/java/com/opensymphony/xwork2/util/profiling/ObjectProfiler.java delete mode 100644 core/src/main/java/com/opensymphony/xwork2/util/profiling/ProfilingTimerBean.java delete mode 100644 core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java delete mode 100644 core/src/main/java/com/opensymphony/xwork2/util/profiling/package.html delete mode 100644 core/src/main/java/org/apache/struts2/interceptor/ProfilingActivationInterceptor.java delete mode 100644 core/src/test/java/com/opensymphony/xwork2/interceptor/TimerInterceptorTest.java delete mode 100644 core/src/test/java/com/opensymphony/xwork2/util/profiling/ProfilingTimerBeanTest.java delete mode 100644 core/src/test/java/com/opensymphony/xwork2/util/profiling/UtilTimerStackTest.java -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch master updated: Remove deprecated exceptions
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 5c76015 Remove deprecated exceptions 5c76015 is described below commit 5c76015ccd22e12d0482560c2e20e766d3428189 Author: Aleksandr Mashchenko AuthorDate: Sun Jun 3 23:00:59 2018 +0300 Remove deprecated exceptions --- .../xwork2/InvalidMetadataException.java | 40 -- .../xwork2/config/ReferenceResolverException.java | 49 -- 2 files changed, 89 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/InvalidMetadataException.java b/core/src/main/java/com/opensymphony/xwork2/InvalidMetadataException.java deleted file mode 100644 index 28f921b..000 --- a/core/src/main/java/com/opensymphony/xwork2/InvalidMetadataException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * InvalidMetadataException - * - * @author Rainer Hermanns - * @version $Id$ - * - * @deprecated to be removed - */ -@Deprecated -public class InvalidMetadataException extends RuntimeException { - -/** -* Create a new InvalidMetadataException with the supplied error message. - * -* @param msg the error message -*/ - public InvalidMetadataException(String msg) { - super(msg); - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ReferenceResolverException.java b/core/src/main/java/com/opensymphony/xwork2/config/ReferenceResolverException.java deleted file mode 100644 index 6f06cc8..000 --- a/core/src/main/java/com/opensymphony/xwork2/config/ReferenceResolverException.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.config; - -import com.opensymphony.xwork2.XWorkException; - - -/** - * Exception when a reference can't be resolved. - * - * @author Mike - * - * @deprecated to be removed - */ -@Deprecated -public class ReferenceResolverException extends XWorkException { - -public ReferenceResolverException() { -super(); -} - -public ReferenceResolverException(String s) { -super(s); -} - -public ReferenceResolverException(String s, Throwable cause) { -super(s, cause); -} - -public ReferenceResolverException(Throwable cause) { -super(cause); -} -} -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-master] branch master updated: Add Stefaan Dutry to developers list
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-master.git The following commit(s) were added to refs/heads/master by this push: new 2c7ad09 Add Stefaan Dutry to developers list 2c7ad09 is described below commit 2c7ad095d2bb68453b172b0ea6bd4c562f373729 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Mon Oct 23 20:19:19 2017 +0300 Add Stefaan Dutry to developers list --- pom.xml | 8 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index c0f8636..c676876 100755 --- a/pom.xml +++ b/pom.xml @@ -326,6 +326,14 @@ PMC Member + +Stefaan Dutry +sdutry +sdutry at apache.org + +Committer + + -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts-site] branch master updated: update copyright year
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new 5998fd2 update copyright year 5998fd2 is described below commit 5998fd267deaab3244877d94e9b7f14ac028cf6b Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Sun Feb 4 23:13:30 2018 +0200 update copyright year --- source/_includes/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_includes/footer.html b/source/_includes/footer.html index 8aec1ca..71930dd 100644 --- a/source/_includes/footer.html +++ b/source/_includes/footer.html @@ -1,7 +1,7 @@ -Copyright 2000-2017 http://www.apache.org/;>The Apache Software Foundation . +Copyright 2000-2018 http://www.apache.org/;>The Apache Software Foundation . All Rights Reserved. -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] 01/02: WW-4914 Update Log4j2 to 2.10.0
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 56c6456c617893867f6b2beb7f38d8a381c257b6 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Mon Feb 5 18:31:56 2018 +0200 WW-4914 Update Log4j2 to 2.10.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d6b26e4..a948f5f 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ 5.2 3.0.7 1.0.6 -2.9.1 +2.10.0 2.9.2 -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch master updated (20a7b65 -> eed364f)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from 20a7b65 Merge pull request #207 from lukaszlenart/sessionless new 56c6456 WW-4914 Update Log4j2 to 2.10.0 new eed364f Use managed surefire version in core The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: core/pom.xml | 1 - pom.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] 02/02: Use managed surefire version in core
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit eed364fe28a905707674ff11855c1f09e953d931 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Mon Feb 5 18:39:12 2018 +0200 Use managed surefire version in core --- core/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 66519f0..61e6772 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -40,7 +40,6 @@ org.apache.maven.plugins maven-surefire-plugin -2.6 -Duser.language=en -Duser.region=US -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch master updated: use NumberUtils.isCreatable instead of deprecated NumberUtils.isNumber
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 6ae63d7 use NumberUtils.isCreatable instead of deprecated NumberUtils.isNumber 6ae63d7 is described below commit 6ae63d7669ce00afc3db99359193efe3db8d6df3 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Feb 6 18:22:40 2018 +0200 use NumberUtils.isCreatable instead of deprecated NumberUtils.isNumber --- .../main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java b/core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java index d75a39b..3b3b74b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java @@ -161,7 +161,7 @@ public abstract class AbstractMatcher implements Serializable { //the values map will contain entries like name->"Lex Luthor" and 1->"Lex Luthor" //now add the non-numeric values for (Map.Entry<String,String> entry: vars.entrySet()) { -if (!NumberUtils.isNumber(entry.getKey())) { +if (!NumberUtils.isCreatable(entry.getKey())) { map.put(entry.getKey(), entry.getValue()); } } -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch master updated (b3e51d8 -> cf7cd1f)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from b3e51d8 Merge pull request #246 from aleksandr-m/feature/package_excluded_log add f523a34 WW-4954 Moves XWorkList out of util package new cf7cd1f Merge pull request #249 from apache/WW-4954-struts-2-5 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../com/opensymphony/xwork2/conversion/impl/CollectionConverter.java | 1 - .../com/opensymphony/xwork2/{util => conversion/impl}/XWorkList.java | 3 +-- .../opensymphony/xwork2/{util => conversion/impl}/XWorkListTest.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) rename core/src/main/java/com/opensymphony/xwork2/{util => conversion/impl}/XWorkList.java (98%) rename core/src/test/java/com/opensymphony/xwork2/{util => conversion/impl}/XWorkListTest.java (98%)
[struts] 01/01: Merge pull request #249 from apache/WW-4954-struts-2-5
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit cf7cd1f6717158998fe2608c960719412e3a4776 Merge: b3e51d8 f523a34 Author: Aleksandr Mashchenko AuthorDate: Tue Sep 4 20:30:40 2018 +0300 Merge pull request #249 from apache/WW-4954-struts-2-5 WW-4954 Moves XWorkList out of util package .../com/opensymphony/xwork2/conversion/impl/CollectionConverter.java | 1 - .../com/opensymphony/xwork2/{util => conversion/impl}/XWorkList.java | 3 +-- .../opensymphony/xwork2/{util => conversion/impl}/XWorkListTest.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
[struts-site] branch master updated (1f66ba6 -> 2d9f2e8)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 1f66ba6 release 2.5.17 and 2.3.35 add 56489a3 add missing word new 2d9f2e8 Merge pull request #119 from figueroaRicardo/fix-typo The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: source/submitting-patches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[struts-site] 01/01: Merge pull request #119 from figueroaRicardo/fix-typo
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit 2d9f2e81b3fb95ccabb43c0b5a5068ed9831e656 Merge: 1f66ba6 56489a3 Author: Aleksandr Mashchenko AuthorDate: Fri Sep 7 22:48:42 2018 +0300 Merge pull request #119 from figueroaRicardo/fix-typo add missing word source/submitting-patches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[struts-site] branch master updated: update old source repository links
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new 5f7c427 update old source repository links 5f7c427 is described below commit 5f7c427581d75a4873f1d14730aaacbe24a0fbd1 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Sun Mar 11 16:18:41 2018 +0200 update old source repository links --- source/_includes/header.html | 2 +- source/builds.md | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/_includes/header.html b/source/_includes/header.html index aeafe2b..39e6bdf 100644 --- a/source/_includes/header.html +++ b/source/_includes/header.html @@ -88,7 +88,7 @@ Release Guidelines PMC Charter Volunteers -https://git-wip-us.apache.org/repos/asf?p=struts.git;>Source Repository +https://gitbox.apache.org/repos/asf?p=struts.git;>Source Repository http://www.apache.org/;> diff --git a/source/builds.md b/source/builds.md index 53c0ef8..3322726 100644 --- a/source/builds.md +++ b/source/builds.md @@ -19,16 +19,16 @@ NOTE: The full source code is provided with each [release](/download.cgi). If yo your own copy of the product, use the source code provided with an approved release, rather than the development head. Read-only access to the Apache Struts source repository is available through both -[web browser](https://git-wip-us.apache.org/repos/asf/struts/repo?p=struts.git;a=summary) and +[web browser](https://gitbox.apache.org/repos/asf?p=struts.git;a=summary) and [Git client](http://git-scm.com/) interfaces. With the [Git client](http://git-scm.com/) installed, obtaining a working copy of the Struts codebase is as simple as -> git clone http://git.apache.org/struts.git +> git clone https://gitbox.apache.org/repos/asf/struts.git -(Committers with write access should use the **https** protocol instead) +or from GitHub -> git clone https://git-wip-us.apache.org/repos/asf/struts.git +> git clone https://github.com/apache/struts.git For more about using version control systems at Apache, see the ASF's -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-site] branch master updated: update component tag page
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new 6436221 update component tag page 6436221 is described below commit 6436221a2bdf03f5f44002d4575b575f84311816 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Mar 13 18:42:20 2018 +0200 update component tag page --- source/tag-developers/component-tag.md | 138 - 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/source/tag-developers/component-tag.md b/source/tag-developers/component-tag.md index d7ec1ec..a449a30 100644 --- a/source/tag-developers/component-tag.md +++ b/source/tag-developers/component-tag.md @@ -9,51 +9,53 @@ __Description__ {% comment %}start snippet id=javadoc|javadoc=true|url=org.apache.struts2.components.GenericUIBean {% endcomment %} - + Renders an custom UI widget using the specified templates. Additional objects can be passed in to the template - using the param tags. - + using the `param` tags. + + +### Freemarker: + + Objects provided can be retrieve from within the template via `$parameters._paramname_`. + +### JSP: - Freemarker: - Objects provided can be retrieve from within the template via $parameters._paramname_. + Objects provided can be retrieve from within the template via `` - JSP: - Objects provided can be retrieve from within the template via - In the bottom JSP and Velocity samples, two parameters are being passed in to the component. From within the component, they can be accessed as: - - Freemarker: - $parameters.get('key1') and $parameters.get('key2') or $parameters.key1 and $parameters.key2 - JSP: - - and or - and - +### Freemarker: + + `$parameters.get('key1')` and `$parameters.get('key2')` or `$parameters.key1` and `$parameters.key2` + +### JSP: + + `` and `` or + `` and `` + + - Currently, your custom UI components can be written in Velocity, JSP, or Freemarker, and the correct rendering engine will be found based on file extension. - - - Remember: the value params will always be resolved against the ValueStack so if you mean to pass a - string literal to your component, make sure to wrap it in single quotes i.e. value="'value1'" (note the opening "' and closing '" otherwise, the the value - stack will search for an Object on the stack with a method of getValue1(). - - + + + **Remember:** the value `params` will always be resolved against the ValueStack so if you mean to pass a + string literal to your component, make sure to wrap it in single quotes i.e. `value="'value1'"` (note the opening `"'` and closing `'"` otherwise, the value + stack will search for an Object on the stack with a method of `getValue1()`. + {% comment %}end snippet id=javadoc|javadoc=true|url=org.apache.struts2.components.GenericUIBean {% endcomment %} {% comment %}start snippet id=note|javadoc=true|url=org.apache.struts2.components.GenericUIBean {% endcomment %} - - If Jsp is used as the template, the jsp template itself must lie within the + + If JSP is used as the template, the JSP template itself must lie within the webapp itself and not the classpath. Unlike Freemarker or Velocity, JSP template could not be picked up from the classpath. - + {% comment %}end snippet id=note|javadoc=true|url=org.apache.struts2.components.GenericUIBean {% endcomment %} **(!) templateDir and theme attribute** @@ -807,49 +809,47 @@ __Examples__ {% comment %}start snippet id=example|lang=xml|javadoc=true|url=org.apache.struts2.components.GenericUIBean {% endcomment %} -```ftl - - JSP - - - - - or - - - - - - - - - Velocity - - - #s-component( "template=/my/custom/component.vm" ) - - or - - #s-component( "template=/my/custom/component.vm" ) - #s-param( "name=key1" "value=value1" ) - #s-param( "name=key2" "value=value2" ) - #end - - - - Freemarker - - -<@s..component template="/my/custom/component.ftl" /> - - or - -<@s..component template="/my/custom/component.ftl"> - <@s..param name="key1" value="%{'value1'}" /> - <@s..param name="key2" value="%{'value2'}" /> - - +### JSP ``` + +``` +or + +``` + + + + +``` + + +### Velocity + +``` +#s-component( "template=/my/custom/component.vm" ) +``` +or + +``` +#s-component( "template=/my/custom/component.vm" ) +#s-param( "name=key1" "value=value1" ) +#s-param( "name=key2" "value=value2" ) +#end +``` + +### Freemarker + +``` +<@s..component template="/my/custom/com
[struts-site] 01/02: fix themes links
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit da53672bd93c769c6dda67aefc3f014238a40315 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Mar 13 19:01:13 2018 +0200 fix themes links --- source/tag-developers/ajax-common-header.md | 6 +++--- source/tag-developers/form-tag.md | 2 +- source/tag-developers/submit-tag.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/tag-developers/ajax-common-header.md b/source/tag-developers/ajax-common-header.md index b65ec6c..ed983de 100644 --- a/source/tag-developers/ajax-common-header.md +++ b/source/tag-developers/ajax-common-header.md @@ -7530,7 +7530,7 @@ __Description__ -| While this tag can be used with the [simple theme](#PAGE_14291), [xhtml theme](#PAGE_13834), and others, it is really designed to work best with the [ajax theme](#PAGE_14205). We recommend reading the _ajax div template_ documentation for more details. +| While this tag can be used with the [simple theme](simple-theme.html), [xhtml theme](xhtml-theme.html), and others, it is really designed to work best with the [ajax theme](ajax-theme.html). We recommend reading the _ajax div template_ documentation for more details. | @@ -14712,7 +14712,7 @@ __Examples__ __Validation__ -There are two flavours _Client Side Validation_ , depending on the theme you are using (xhtml, ajax, etc). If you are using the [xhtml theme](#PAGE_13834) or [css_xhtml theme](#PAGE_14215), pure client side validation will be used. If you are using the [ajax theme](#PAGE_14205), a special AJAX-based validation will take place. Read the _Client Side Validation_ docs for more information. +There are two flavours _Client Side Validation_ , depending on the theme you are using (xhtml, ajax, etc). If you are using the [xhtml theme](xhtml-theme.html) or [css_xhtml theme](css-xhtml-theme.html), pure client side validation will be used. If you are using the [ajax theme](ajax-theme.html), a special AJAX-based validation will take place. Read the _Client Side Validation_ docs for more information. #head# {#PAGE_13997} @@ -23996,7 +23996,7 @@ __Description__ | -This tag works with all themes, but has special importance when combined with the [form](#PAGE_14201) tag in the [ajax theme](#PAGE_14205). Please read up on the [ajax theme](#PAGE_14205) for more information. +This tag works with all themes, but has special importance when combined with the [form](#PAGE_14201) tag in the [ajax theme](ajax-theme.html). Please read up on the [ajax theme](ajax-theme.html) for more information. | diff --git a/source/tag-developers/form-tag.md b/source/tag-developers/form-tag.md index 7996ce0..9ae7796 100644 --- a/source/tag-developers/form-tag.md +++ b/source/tag-developers/form-tag.md @@ -1016,4 +1016,4 @@ __Examples__ __Validation__ -There are two flavours _Client Side Validation_ , depending on the theme you are using (xhtml, ajax, etc). If you are using the [xhtml theme](#PAGE_13834) or [css_xhtml theme](#PAGE_14215), pure client side validation will be used. If you are using the [ajax theme](#PAGE_14205), a special AJAX-based validation will take place. Read the _Client Side Validation_ docs for more information. +There are two flavours _Client Side Validation_ , depending on the theme you are using (xhtml, ajax, etc). If you are using the [xhtml theme](xhtml-theme.html) or [css_xhtml theme](css-xhtml-theme.html), pure client side validation will be used. If you are using the [ajax theme](ajax-theme.html), a special AJAX-based validation will take place. Read the _Client Side Validation_ docs for more information. diff --git a/source/tag-developers/submit-tag.md b/source/tag-developers/submit-tag.md index 2ee1be3..eb71673 100644 --- a/source/tag-developers/submit-tag.md +++ b/source/tag-developers/submit-tag.md @@ -34,7 +34,7 @@ __Description__ | -This tag works with all themes, but has special importance when combined with the [form](#PAGE_14201) tag in the [ajax theme](#PAGE_14205). Please read up on the [ajax theme](#PAGE_14205) for more information. +This tag works with all themes, but has special importance when combined with the [form](#PAGE_14201) tag in the [ajax theme](ajax-theme.html). Please read up on the [ajax theme](ajax-theme.html) for more information. | -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-site] 02/02: fix more page links
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit 6ac031dfea2081b28df1dcd128f2d3a85940f0d9 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Mar 13 19:06:32 2018 +0200 fix more page links --- source/tag-developers/ajax-common-header.md | 4 ++-- source/tag-developers/form-tags.md | 2 +- source/tag-developers/submit-tag.md | 2 +- source/tag-developers/velocity-tags.md | 4 ++-- source/tag-developers/velocity.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/tag-developers/ajax-common-header.md b/source/tag-developers/ajax-common-header.md index ed983de..e4194f4 100644 --- a/source/tag-developers/ajax-common-header.md +++ b/source/tag-developers/ajax-common-header.md @@ -13699,7 +13699,7 @@ __Examples__ {% comment %}end snippet id=example|lang=xml|javadoc=true|url=org.apache.struts2.components.File {% endcomment %} -#form# {#PAGE_14201} +#form# {form-tag.html} Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. @@ -23996,7 +23996,7 @@ __Description__ | -This tag works with all themes, but has special importance when combined with the [form](#PAGE_14201) tag in the [ajax theme](ajax-theme.html). Please read up on the [ajax theme](ajax-theme.html) for more information. +This tag works with all themes, but has special importance when combined with the [form](form-tag.html) tag in the [ajax theme](ajax-theme.html). Please read up on the [ajax theme](ajax-theme.html) for more information. | diff --git a/source/tag-developers/form-tags.md b/source/tag-developers/form-tags.md index fcab7f8..94fb804 100644 --- a/source/tag-developers/form-tags.md +++ b/source/tag-developers/form-tags.md @@ -13,7 +13,7 @@ Within the form tags, there are two classes of tags: the form tag itself, and al __Form Tag Themes__ -As explained in [Themes and Templates](#PAGE_14247), the HTML Tags (which includes Form Tags) are all driven by templates. Templates are grouped together to create themes. The framework bundles three themes in the distribution. +As explained in [Themes and Templates](themes-and-templates.html), the HTML Tags (which includes Form Tags) are all driven by templates. Templates are grouped together to create themes. The framework bundles three themes in the distribution. |simple|Sometimes _too_ simple| |--|---| diff --git a/source/tag-developers/submit-tag.md b/source/tag-developers/submit-tag.md index eb71673..622a6c9 100644 --- a/source/tag-developers/submit-tag.md +++ b/source/tag-developers/submit-tag.md @@ -34,7 +34,7 @@ __Description__ | -This tag works with all themes, but has special importance when combined with the [form](#PAGE_14201) tag in the [ajax theme](ajax-theme.html). Please read up on the [ajax theme](ajax-theme.html) for more information. +This tag works with all themes, but has special importance when combined with the [form](form-tag.html) tag in the [ajax theme](ajax-theme.html). Please read up on the [ajax theme](ajax-theme.html) for more information. | diff --git a/source/tag-developers/velocity-tags.md b/source/tag-developers/velocity-tags.md index 00d182a..3d287d8 100644 --- a/source/tag-developers/velocity-tags.md +++ b/source/tag-developers/velocity-tags.md @@ -5,7 +5,7 @@ title: Tag Developers Guide # Velocity Tags -Velocity tags are extensions of the generic [Struts Tags](#PAGE_14248) provided by the framework. You can get jump right in just by knowing the structure in which the tags can be accessed: **#s\*tag** **\*(...) ... #end**, where **tag** is any of the [Struts Tags](#PAGE_14248) supported by the framework. +Velocity tags are extensions of the generic [Struts Tags](struts-tags.html) provided by the framework. You can get jump right in just by knowing the structure in which the tags can be accessed: **#s\*tag** **\*(...) ... #end**, where **tag** is any of the [Struts Tags](struts-tags.html) supported by the framework. For example, in JSP you might create a form using Struts tags. @@ -37,7 +37,7 @@ In Velocity, the same form can also be built using macros. ## Block and Inline Tags -Some VM tags require an #end statement while others do not. The inconsistency arises from a limitation in Velocity where tags must declare if they are a _block_ or _inline_ tag up front. As such, by default all tags are _inline_ except for a few key ones, such as the [form](#PAGE_14201) tag. +Some VM tags require an #end statement while others do not. The inconsistency arises from a limitation in Velocity where tags must declare if they are a _block_ or _inline_ tag up front. As such, by default all tags are _inline_ except for a few key ones, such as the
[struts-site] branch master updated (1bdf27e -> 6ac031d)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 1bdf27e fix OGNL page link new da53672 fix themes links new 6ac031d fix more page links The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: source/tag-developers/ajax-common-header.md | 8 source/tag-developers/form-tag.md | 2 +- source/tag-developers/form-tags.md | 2 +- source/tag-developers/submit-tag.md | 2 +- source/tag-developers/velocity-tags.md | 4 ++-- source/tag-developers/velocity.md | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-site] branch master updated: remove old div tag
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new 0c2ec3f remove old div tag 0c2ec3f is described below commit 0c2ec3fc6d904d975679188f5208eb93cfa2bd1e Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Mar 13 18:32:14 2018 +0200 remove old div tag --- source/tag-developers/div-tag.md | 765 - source/tag-developers/tag-reference.md | 8 +- 2 files changed, 4 insertions(+), 769 deletions(-) diff --git a/source/tag-developers/div-tag.md b/source/tag-developers/div-tag.md deleted file mode 100644 index e5127d9..000 --- a/source/tag-developers/div-tag.md +++ /dev/null @@ -1,765 +0,0 @@ -layout: default -title: Tag Developers Guide - -# div - -__Description__ - - - -{% comment %}start snippet id=javadoc|javadoc=true|url=https://gitbox.apache.org/repos/asf?p=struts.git;a=blob_plain;f=core/src/main/java/org/apache/struts2/components/Div.java;h=5967686a4283c45d90558a0831e22122df47f35e;hb=974e051bc5e2541261c44cd6fc27717dfcb3267b {% endcomment %} - Creates an HTML \<div\> - -{% comment %}end snippet id=javadoc|javadoc=true|url=https://gitbox.apache.org/repos/asf?p=struts.git;a=blob_plain;f=core/src/main/java/org/apache/struts2/components/Div.java;h=5967686a4283c45d90558a0831e22122df47f35e;hb=974e051bc5e2541261c44cd6fc27717dfcb3267b {% endcomment %} - - - -| While this tag can be used with the [simple theme](#PAGE_14291), [xhtml theme](#PAGE_13834), and others, it is really designed to work best with the [ajax theme](#PAGE_14205). We recommend reading the _ajax div template_ documentation for more details. - -| - -__Parameters__ - - - -{% comment %}start snippet id=tagattributes|javadoc=false|url=struts2-tags/div.html {% endcomment %} - - - - - Dynamic Attributes Allowed: true - - - - - - - - - - - - Name - - Required - - Default - - Evaluated - - Type - - Description - - - - - - accesskey - - false - - - - false - - String - - Set the html accesskey attribute on rendered html element - - - - - - class - - false - - - - false - - String - - The css class to use for element - it's an alias of cssClass attribute. - - - - - - cssClass - - false - - - - false - - String - - The css class to use for element - - - - - - cssErrorClass - - false - - - - false - - String - - The css error class to use for element - - - - - - cssErrorStyle - - false - - - - false - - String - - The css error style definitions for element to use - - - - - - cssStyle - - false - - - - false - - String - - The css style definitions for element to use - - - - - -
[struts-site] 02/02: fix OGNL page link
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit 1bdf27e215caac3421ea5d02781bf214bcd7c5b0 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Mar 13 18:53:44 2018 +0200 fix OGNL page link --- source/tag-developers/tag-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tag-developers/tag-syntax.md b/source/tag-developers/tag-syntax.md index 06c44b0..5f28e45 100644 --- a/source/tag-developers/tag-syntax.md +++ b/source/tag-developers/tag-syntax.md @@ -29,7 +29,7 @@ Sometimes, we want to pass the dynamic data to a tag. For example, we might want ``` -The expression language ([OGNL](#PAGE_14198)) lets us call methods and evaluate properties. The method `getText` is provided by ActionSupport, which is the base class for most Actions. Since the Action is on the stack, we can call any of its methods from an expression, including `getText`. +The expression language ([OGNL](ognl.html)) lets us call methods and evaluate properties. The method `getText` is provided by ActionSupport, which is the base class for most Actions. Since the Action is on the stack, we can call any of its methods from an expression, including `getText`. ## Non-String Attributes -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-site] branch master updated (6436221 -> 1bdf27e)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 6436221 update component tag page new eefcfdc fix tag-syntax page links new 1bdf27e fix OGNL page link The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: source/tag-developers/ajax-common-header.md | 42 +++ source/tag-developers/checkbox-tag.md | 2 +- source/tag-developers/checkboxlist-tag.md | 2 +- source/tag-developers/combobox-tag.md | 2 +- source/tag-developers/datetextfield-tag.md| 2 +- source/tag-developers/doubleselect-tag.md | 2 +- source/tag-developers/else-tag.md | 2 +- source/tag-developers/elseif-tag.md | 2 +- source/tag-developers/file-tag.md | 2 +- source/tag-developers/form-tag.md | 2 +- source/tag-developers/form-tags.md| 2 +- source/tag-developers/head-tag.md | 2 +- source/tag-developers/hidden-tag.md | 2 +- source/tag-developers/i18n-tag.md | 2 +- source/tag-developers/if-tag.md | 2 +- source/tag-developers/include-tag.md | 2 +- source/tag-developers/iterator-tag.md | 2 +- source/tag-developers/label-tag.md| 2 +- source/tag-developers/merge-tag.md| 2 +- source/tag-developers/optgroup-tag.md | 2 +- source/tag-developers/optiontransferselect-tag.md | 2 +- source/tag-developers/param-tag.md| 2 +- source/tag-developers/password-tag.md | 2 +- source/tag-developers/property-tag.md | 2 +- source/tag-developers/push-tag.md | 2 +- source/tag-developers/radio-tag.md| 2 +- source/tag-developers/reset-tag.md| 2 +- source/tag-developers/select-tag.md | 2 +- source/tag-developers/set-tag.md | 2 +- source/tag-developers/sort-tag.md | 2 +- source/tag-developers/submit-tag.md | 2 +- source/tag-developers/tag-syntax.md | 2 +- source/tag-developers/text-tag.md | 2 +- source/tag-developers/textarea-tag.md | 2 +- source/tag-developers/textfield-tag.md| 2 +- source/tag-developers/token-tag.md| 2 +- source/tag-developers/updownselect-tag.md | 2 +- source/tag-developers/url-tag.md | 2 +- 38 files changed, 58 insertions(+), 58 deletions(-) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-site] 01/02: fix tag-syntax page links
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit eefcfdca7c1e5a113e5ed8dd987de081dc964551 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Tue Mar 13 18:50:40 2018 +0200 fix tag-syntax page links --- source/tag-developers/ajax-common-header.md | 42 +++ source/tag-developers/checkbox-tag.md | 2 +- source/tag-developers/checkboxlist-tag.md | 2 +- source/tag-developers/combobox-tag.md | 2 +- source/tag-developers/datetextfield-tag.md| 2 +- source/tag-developers/doubleselect-tag.md | 2 +- source/tag-developers/else-tag.md | 2 +- source/tag-developers/elseif-tag.md | 2 +- source/tag-developers/file-tag.md | 2 +- source/tag-developers/form-tag.md | 2 +- source/tag-developers/form-tags.md| 2 +- source/tag-developers/head-tag.md | 2 +- source/tag-developers/hidden-tag.md | 2 +- source/tag-developers/i18n-tag.md | 2 +- source/tag-developers/if-tag.md | 2 +- source/tag-developers/include-tag.md | 2 +- source/tag-developers/iterator-tag.md | 2 +- source/tag-developers/label-tag.md| 2 +- source/tag-developers/merge-tag.md| 2 +- source/tag-developers/optgroup-tag.md | 2 +- source/tag-developers/optiontransferselect-tag.md | 2 +- source/tag-developers/param-tag.md| 2 +- source/tag-developers/password-tag.md | 2 +- source/tag-developers/property-tag.md | 2 +- source/tag-developers/push-tag.md | 2 +- source/tag-developers/radio-tag.md| 2 +- source/tag-developers/reset-tag.md| 2 +- source/tag-developers/select-tag.md | 2 +- source/tag-developers/set-tag.md | 2 +- source/tag-developers/sort-tag.md | 2 +- source/tag-developers/submit-tag.md | 2 +- source/tag-developers/text-tag.md | 2 +- source/tag-developers/textarea-tag.md | 2 +- source/tag-developers/textfield-tag.md| 2 +- source/tag-developers/token-tag.md| 2 +- source/tag-developers/updownselect-tag.md | 2 +- source/tag-developers/url-tag.md | 2 +- 37 files changed, 57 insertions(+), 57 deletions(-) diff --git a/source/tag-developers/ajax-common-header.md b/source/tag-developers/ajax-common-header.md index 47d1115..b65ec6c 100644 --- a/source/tag-developers/ajax-common-header.md +++ b/source/tag-developers/ajax-common-header.md @@ -2144,7 +2144,7 @@ Using errorNotifyTopics and indicator: #checkbox# {#PAGE_14029} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understand how tag attribute syntax works. +Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. | @@ -2925,7 +2925,7 @@ __Examples__ #checkboxlist# {#PAGE_13969} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understand how tag attribute syntax works. +Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. | @@ -3822,7 +3822,7 @@ __Examples__ #combobox# {#PAGE_14259} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understand how tag attribute syntax works. +Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. | @@ -5650,7 +5650,7 @@ __Examples__ #datetextfield# {#PAGE_40506485} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understand how tag attribute syntax works. +Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. | @@ -10585,7 +10585,7 @@ __Parameters__ #doubleselect# {#PAGE_14005} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understand how tag attribute syntax works. +Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. | @@ -12912,7 +12912,7 @@ __Examples__ #file# {#PAGE_14283} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understand how tag attribute syntax works. +Please make sure you have read the [Tag Syntax](tag-syntax.html) document and understand how tag attribute syntax works. | @@ -13702,7 +13702,7 @@ __Examples__ #form# {#PAGE_14201} -Please make sure you have read the [Tag Syntax](#PAGE_13927) document and understa
[struts-site] branch master updated (6ac031d -> 813b20f)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 6ac031d fix more page links add bf0710e Re-word new 813b20f Merge pull request #110 from kinow/patch-2 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: source/core-developers/date-validator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-site] 01/01: Merge pull request #110 from kinow/patch-2
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit 813b20f9bb9f3442d5080276e479f601b2fe7022 Merge: 6ac031d bf0710e Author: Aleksandr Mashchenko <aleksand...@users.noreply.github.com> AuthorDate: Wed Mar 14 01:02:17 2018 +0200 Merge pull request #110 from kinow/patch-2 Re-word date validation paragraph source/core-developers/date-validator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts-archetypes] branch master updated: Add basic readme
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-archetypes.git The following commit(s) were added to refs/heads/master by this push: new fcf359c Add basic readme fcf359c is described below commit fcf359c78075a43da73c82478f3ff3917c012320 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Sun Apr 1 00:28:39 2018 +0300 Add basic readme --- README.md | 287 ++ 1 file changed, 287 insertions(+) diff --git a/README.md b/README.md new file mode 100644 index 000..da04840 --- /dev/null +++ b/README.md @@ -0,0 +1,287 @@ +# Struts 2 Maven Archetypes + +Struts 2 provides several [Maven](https://maven.apache.org/) archetypes that create a starting point for our own applications. + +## Quickstart + +A recommended way to start with Struts2 archetypes is to use `archetype:generate` goal with `filter` parameter. + + +``` +mvn archetype:generate -Dfilter=org.apache:struts +``` + +## Available Archetypes + +### The Blank Convention Archetype (struts2-archetype-convention) + + Features + ++ Convention-based validation + ++ Example actions + ++ Package-level resource bundle + ++ Unit-testing + ++ Google AppEgine aware + + + +``` +mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ + -DartifactId=myWebApp \ + -DarchetypeGroupId=org.apache.struts \ + -DarchetypeArtifactId=struts2-archetype-convention +``` + +### The Blank Archetype (struts2-archetype-blank) + +The Struts 2 Blank Archetype (“blank-archetype”) provides a minimal, but complete, Struts 2 application. It demonstrates some of the most basic Struts 2 concepts. + +``` +mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ + -DartifactId=myWebApp \ + -DarchetypeGroupId=org.apache.struts \ + -DarchetypeArtifactId=struts2-archetype-blank +``` + +### The Starter Archetype (struts2-archetype-starter) + +The Starter archetype creates a more featured application using several common technologies used in production applications. + + Features + ++ Sitemesh integration + ++ Action example (instantiated both through Spring and Struts) + ++ Spring integration + ++ Validation example (action and action-alias level) + ++ Conversion example (global and action level) + ++ Resource bundle (both global, action and package level) + + + +``` +mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ + -DartifactId=myWebApp \ + -DarchetypeGroupId=org.apache.struts \ + -DarchetypeArtifactId=struts2-archetype-starter +``` + +### The AngularJS Archetype (struts2-archetype-angularjs) + + Features + ++ Convention-based Action Configuration + ++ Example actions with JSON Result + ++ Example for AngularJS and Struts2 Integration + + + +``` +mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ + -DartifactId=myWebApp \ + -DarchetypeGroupId=org.apache.struts \ + -DarchetypeArtifactId=struts2-archetype-angularjs +``` + +### The Portlet Blank Archetype (struts2-archetype-portlet) + +The Portlet blank archetype creates a minimally populated JSR 168 portlet. + + Features + ++ View, Edit, and Help mode examples + ++ Simple form for preferences in Edit mode + ++ Can be deployed as a servlet or portlet application + ++ Can use Maven Jetty plugin to deploy with the pluto-embedded profile (usage 'mvn jetty:run -Ppluto-embedded', then access http://localhost:8080/<artifactId\>/pluto/index.jsp) + + + +``` +mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ + -DartifactId=myWebApp \ + -DarchetypeGroupId=org.apache.struts \ + -DarchetypeArtifactId=struts2-archetype-portlet +``` + +### The Portlet Database Archetype (struts2-archetype-dbportlet) + +The Portlet database archetype creates a simple JSR 168 portlet that displays the contents of a database table. + + Features + ++ Uses Spring and Hsql to show a real database query + ++ Builtin caching of query results + ++ View, Edit, and Help mode examples + ++ Simple form for preferences in Edit mode + ++ Can be deployed as a servlet or portlet application + ++ Can use
[struts] branch master updated: Add ognlAutoGrowthCollectionLimit constant to java config
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 32af137 Add ognlAutoGrowthCollectionLimit constant to java config 32af137 is described below commit 32af1370ed47b43e6fca035e41adce32dd8e9622 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Sat Mar 17 23:51:44 2018 +0200 Add ognlAutoGrowthCollectionLimit constant to java config --- .../org/apache/struts2/config/entities/ConstantConfig.java | 10 ++ 1 file changed, 10 insertions(+) diff --git a/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java b/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java index 9f191e4..371d3f4 100644 --- a/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/ConstantConfig.java @@ -139,6 +139,7 @@ public class ConstantConfig { private BeanConfig textProviderFactory; private BeanConfig localizedTextProvider; private Boolean disallowProxyMemberAccess; +private Integer ognlAutoGrowthCollectionLimit; protected String beanConfToString(BeanConfig beanConf) { return beanConf == null ? null : beanConf.getName(); @@ -266,6 +267,7 @@ public class ConstantConfig { map.put(StrutsConstants.STRUTS_TEXT_PROVIDER_FACTORY, beanConfToString(textProviderFactory)); map.put(StrutsConstants.STRUTS_LOCALIZED_TEXT_PROVIDER, beanConfToString(localizedTextProvider)); map.put(StrutsConstants.STRUTS_DISALLOW_PROXY_MEMBER_ACCESS, Objects.toString(disallowProxyMemberAccess, null)); +map.put(StrutsConstants.STRUTS_OGNL_AUTO_GROWTH_COLLECTION_LIMIT, Objects.toString(ognlAutoGrowthCollectionLimit, null)); return map; } @@ -1305,4 +1307,12 @@ public class ConstantConfig { public void setDisallowProxyMemberAccess(Boolean disallowProxyMemberAccess) { this.disallowProxyMemberAccess = disallowProxyMemberAccess; } + +public Integer getOgnlAutoGrowthCollectionLimit() { +return ognlAutoGrowthCollectionLimit; +} + +public void setOgnlAutoGrowthCollectionLimit(Integer ognlAutoGrowthCollectionLimit) { +this.ognlAutoGrowthCollectionLimit = ognlAutoGrowthCollectionLimit; +} } -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch master updated: Add tests for java configuration
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 845ab41 Add tests for java configuration 845ab41 is described below commit 845ab413cd077d06de8dcc33c68a1e236067b346 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Mon Mar 19 19:52:16 2018 +0200 Add tests for java configuration --- .../StrutsJavaConfigurationProviderTest.java | 87 +++ .../struts2/config/entities/BeanConfigTest.java| 62 ++ .../config/entities/ConstantConfigTest.java| 97 ++ 3 files changed, 246 insertions(+) diff --git a/core/src/test/java/org/apache/struts2/config/StrutsJavaConfigurationProviderTest.java b/core/src/test/java/org/apache/struts2/config/StrutsJavaConfigurationProviderTest.java new file mode 100644 index 000..933de81 --- /dev/null +++ b/core/src/test/java/org/apache/struts2/config/StrutsJavaConfigurationProviderTest.java @@ -0,0 +1,87 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.config; + +import java.util.Arrays; +import java.util.List; + +import org.apache.struts2.StrutsConstants; +import org.apache.struts2.config.entities.BeanConfig; +import org.apache.struts2.config.entities.ConstantConfig; +import org.junit.Assert; +import org.junit.Test; + +import com.opensymphony.xwork2.TestBean; +import com.opensymphony.xwork2.config.Configuration; +import com.opensymphony.xwork2.config.impl.MockConfiguration; +import com.opensymphony.xwork2.inject.Container; +import com.opensymphony.xwork2.inject.ContainerBuilder; +import com.opensymphony.xwork2.inject.Scope; +import com.opensymphony.xwork2.util.location.LocatableProperties; + +public class StrutsJavaConfigurationProviderTest { +@Test +public void testRegister() throws Exception { +final ConstantConfig constantConfig = new ConstantConfig(); +constantConfig.setDevMode(true); + +final String expectedUnknownHandler = "expectedUnknownHandler"; + +StrutsJavaConfiguration javaConfig = new StrutsJavaConfiguration() { +@Override +public List unknownHandlerStack() { +return Arrays.asList(expectedUnknownHandler); +} + +@Override +public List constants() { +return Arrays.asList(constantConfig); +} + +@Override +public List beans() { +return Arrays.asList(new BeanConfig(TestBean.class), +new BeanConfig(TestBean.class, "testBean", TestBean.class, Scope.PROTOTYPE, true, true)); +} +}; +StrutsJavaConfigurationProvider provider = new StrutsJavaConfigurationProvider(javaConfig); + +Configuration configuration = new MockConfiguration(); + +provider.init(configuration); + +ContainerBuilder builder = new ContainerBuilder(); +LocatableProperties props = new LocatableProperties(); + +provider.register(builder, props); + +// constant +Assert.assertEquals(String.valueOf(constantConfig.getDevMode()), props.get(StrutsConstants.STRUTS_DEVMODE)); + +// unknown-handler-stack +Assert.assertNotNull(configuration.getUnknownHandlerStack()); +Assert.assertEquals(1, configuration.getUnknownHandlerStack().size()); +Assert.assertEquals(expectedUnknownHandler, configuration.getUnknownHandlerStack().get(0).getName()); + +// bean +Container container = builder.create(true); +TestBean testBean = container.getInstance(TestBean.class); +Assert.assertNotNull(testBean); +} +} diff --git a/core/src/test/java/org/apache/struts2/config/entities/BeanConfigTest.java b/core/src/test/java/org/apache/struts2/config/entities/BeanConfigTest.java new file mode 100644 index 000..72709e6 --- /dev/null +++ b/core/src/test/java/org/apache/struts2/config/entities/BeanConfigTest.java @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache S
[struts] branch master updated (3005f43 -> 3fd3196)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from 3005f43 Merge pull request #217 from aleksandr-m/feature/WW-4928 add 502c897 Added requiredValue to Checkbox Struts Tag as a parameter. When requiredValue set to "false", unchecked checkbox elements will not be submitted with the form (i.e. no hidden input html elements will be created for the checkbox) add 78ef9b2 Change Checkbox tag parameter from requiredValue to submitUnchecked add 35480e6 Change Checkbox tag parameter submitUnchecked default value to "false" Add tests for both true and false values of submitUnchecked add 502c57d Fix broken tests due to checkbox submitUnchecked default value change new 3fd3196 Merge pull request #169 from burtonrhodes/checkbox_requiredValue The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/struts2/components/Checkbox.java| 10 + .../apache/struts2/views/jsp/ui/CheckboxTag.java | 6 +++ .../main/resources/template/simple/checkbox.ftl| 7 +++- core/src/site/resources/tags/checkbox.html | 8 .../apache/struts2/views/jsp/ui/CheckboxTest.java | 44 ++ .../org/apache/struts2/views/jsp/ui/Checkbox-1.txt | 1 - .../org/apache/struts2/views/jsp/ui/Checkbox-2.txt | 1 - .../org/apache/struts2/views/jsp/ui/Checkbox-3.txt | 1 - .../apache/struts2/views/jsp/ui/Checkbox-33.txt| 1 - .../org/apache/struts2/views/jsp/ui/Checkbox-4.txt | 1 - .../org/apache/struts2/views/jsp/ui/Checkbox-5.txt | 1 - .../org/apache/struts2/views/jsp/ui/Checkbox-6.txt | 1 - .../jsp/ui/{Checkbox-6.txt => Checkbox-7.txt} | 3 +- .../jsp/ui/{Checkbox-6.txt => Checkbox-8.txt} | 8 ++-- 14 files changed, 78 insertions(+), 15 deletions(-) copy core/src/test/resources/org/apache/struts2/views/jsp/ui/{Checkbox-6.txt => Checkbox-7.txt} (58%) copy core/src/test/resources/org/apache/struts2/views/jsp/ui/{Checkbox-6.txt => Checkbox-8.txt} (72%) -- To stop receiving notification emails like this one, please contact amashche...@apache.org.
[struts] branch struts-2-5-x updated (f4d7dbe -> 8293add)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git. from f4d7dbe [maven-release-plugin] prepare for next development iteration add 567fae9 WW-4971 Fix broken s:includes for non-UTF8 content. The low-risk fix retains existing behaviour by default, but provides a configuration flag users can set (to true) in order to enable usage of response (page) encoding for s:include tags. A WARN level log output is also generated for failed FastByteArrayOutputStream decoding (can be suppressed by log configuration). add 7bca982 Fix typos and whitespace (on top of WW-4971 Fix broken s:includes for non-UTF8 content). new 8293add Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 36 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 138 insertions(+), 47 deletions(-)
[struts] 01/01: Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit 8293add6aaa6f496c636f39982d99950621d44a5 Merge: f4d7dbe 7bca982 Author: Aleksandr Mashchenko AuthorDate: Thu Nov 1 21:53:04 2018 +0200 Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch Fix WW-4971 (broken includes for non-UTF8 content). .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 36 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 138 insertions(+), 47 deletions(-)
[struts] 02/02: WW-4971 Use response encoding for include by default
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 9fd8d6fa8019e7a15ee3dfb9fba17aca36ff0b20 Author: Aleksandr Mashchenko AuthorDate: Thu Nov 1 22:05:47 2018 +0200 WW-4971 Use response encoding for include by default --- core/src/main/java/org/apache/struts2/components/Include.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/Include.java b/core/src/main/java/org/apache/struts2/components/Include.java index 616aa18..70692bf 100644 --- a/core/src/main/java/org/apache/struts2/components/Include.java +++ b/core/src/main/java/org/apache/struts2/components/Include.java @@ -98,13 +98,12 @@ public class Include extends Component { private HttpServletRequest req; private HttpServletResponse res; private String defaultEncoding; // Made non-static (during WW-4971 fix) -private boolean useResponseEncoding; // Added with WW-4971 fix (allows switch between usage of response or default encoding) +private boolean useResponseEncoding = true; // Added with WW-4971 fix (allows switch between usage of response or default encoding) public Include(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { super(stack); this.req = req; this.res = res; -useResponseEncoding = false; // By default use defaultEncoding (vs. response/page encoding) } @Inject(StrutsConstants.STRUTS_I18N_ENCODING)
[struts] branch master updated (b82db24 -> 9fd8d6f)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from b82db24 [WW-4973] Upgrades to OGNL 3.2.8 (#258) new 9fa53dd Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch new 9fd8d6f WW-4971 Use response encoding for include by default The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 35 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 137 insertions(+), 47 deletions(-)
[struts] 01/02: Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 9fa53dddb92c6eea59396d9505c467acb1d74d97 Author: Aleksandr Mashchenko AuthorDate: Thu Nov 1 21:53:04 2018 +0200 Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch Fix WW-4971 (broken includes for non-UTF8 content). --- .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 36 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 138 insertions(+), 47 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java index 81a4f80..f786305 100644 --- a/core/src/main/java/org/apache/struts2/StrutsConstants.java +++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java @@ -41,12 +41,15 @@ public final class StrutsConstants { /** The URL extension to use to determine if the request is meant for a Struts action */ public static final String STRUTS_ACTION_EXTENSION = "struts.action.extension"; - /** Comma separated list of patterns (java.util.regex.Pattern) to be excluded from Struts2-processing */ - public static final String STRUTS_ACTION_EXCLUDE_PATTERN = "struts.action.excludePattern"; +/** Comma separated list of patterns (java.util.regex.Pattern) to be excluded from Struts2-processing */ +public static final String STRUTS_ACTION_EXCLUDE_PATTERN = "struts.action.excludePattern"; -/** Whether to use the alterative syntax for the tags or not */ +/** Whether to use the alternative syntax for the tags or not */ public static final String STRUTS_TAG_ALTSYNTAX = "struts.tag.altSyntax"; +/** Whether to use the response encoding (JSP page encoding) for s:include tag processing (false - use STRUTS_I18N_ENCODING - by default) */ +public static final String STRUTS_TAG_INCLUDETAG_USERESPONSEENCODING = "struts.tag.includetag.useResponseEncoding"; + /** The HTTP port used by Struts URLs */ public static final String STRUTS_URL_HTTP_PORT = "struts.url.http.port"; @@ -56,7 +59,7 @@ public final class StrutsConstants { /** The default includeParams method to generate Struts URLs */ public static final String STRUTS_URL_INCLUDEPARAMS = "struts.url.includeParams"; - public static final String STRUTS_URL_RENDERER = "struts.urlRenderer"; +public static final String STRUTS_URL_RENDERER = "struts.urlRenderer"; /** The com.opensymphony.xwork2.ObjectFactory implementation class */ public static final String STRUTS_OBJECTFACTORY = "struts.objectFactory"; @@ -91,7 +94,7 @@ public final class StrutsConstants { /** The org.apache.struts2.views.freemarker.FreemarkerManager implementation class */ public static final String STRUTS_FREEMARKER_MANAGER_CLASSNAME = "struts.freemarker.manager.classname"; -/** Update freemarker templates cache in seconds*/ +/** Update freemarker templates cache in seconds */ public static final String STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY = "struts.freemarker.templatesCache.updateDelay"; /** Cache model instances at BeanWrapper level */ @@ -220,12 +223,12 @@ public final class StrutsConstants { public static final String STRUTS_LOCALE_PROVIDER_FACTORY = "struts.localeProviderFactory"; /** The name of the parameter to create when mapping an id (used by some action mappers) */ - public static final String STRUTS_ID_PARAMETER_NAME = "struts.mapper.idParameterName"; - - /** The name of the parameter to determine whether static method access will be allowed in OGNL expressions or not */ - public static final String STRUTS_ALLOW_STATIC_METHOD_ACCESS = "struts.ognl.allowStaticMethodAccess"; +public static final String STRUTS_ID_PARAMETER_NAME = "struts.mapper.idParameterName"; + +/** The name of the parameter to determine whether static method access will be allowed in OGNL expressions or not */ +public static final String STRUTS_ALLOW_STATIC_METHOD_ACCESS = "struts.ognl.allowStaticMethodAccess"; - /** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */ +/** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */ public static final String STRUTS_ACTIONVALIDATORMANAGER = "struts.actionValidatorManager"; /** The {@link com.opensymphony.xwork2.util.ValueStackFactory} implementation class */ @@ -236,7 +239,7 @@ pu
[struts] branch master updated: WW-4956 Upgrade to Log4j2 2.11.1
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new fd63512 WW-4956 Upgrade to Log4j2 2.11.1 fd63512 is described below commit fd63512318adc5cbc1f5d627e4ae0f7f257649ce Author: Aleksandr Mashchenko AuthorDate: Sun Sep 2 22:08:33 2018 +0300 WW-4956 Upgrade to Log4j2 2.11.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0b6e79d..9af53c5 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ 5.2 3.0.8 1.0.7 -2.10.0 +2.11.1 2.9.5
[struts] branch struts-2-5-x updated (daf6f6f -> daac47e)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git. from daf6f6f Merge pull request #244 from apache/WW-4954 new b1709c5 Better logging message (for WW-4954) new daac47e Improve log messages in SecurityMemberAccess The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../xwork2/ognl/SecurityMemberAccess.java| 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-)
[struts] 01/02: Better logging message (for WW-4954)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit b1709c5208b599b5aaff20f712bd8f70428295a0 Author: Aleksandr Mashchenko AuthorDate: Fri Aug 31 00:05:42 2018 +0300 Better logging message (for WW-4954) (cherry picked from commit b213d58f54d3bc89b21726d441325202ef99628d) --- .../main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java index 0c58740..f09cf30 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java @@ -75,7 +75,8 @@ public class SecurityMemberAccess extends DefaultMemberAccess { } if (isPackageExcluded(targetClass.getPackage(), memberClass.getPackage())) { -LOG.warn("Package of target [{}] or package of member [{}] are excluded!", target, member); +LOG.warn("Package [{}] of target class [{}] of target [{}] or package [{}] of member [{}] are excluded!", targetClass.getPackage(), targetClass, +target, memberClass.getPackage(), member); return false; }
[struts] 02/02: Improve log messages in SecurityMemberAccess
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit daac47ee62e8ca63f769e03c1936a4858ddfe7f9 Author: Aleksandr Mashchenko AuthorDate: Fri Aug 31 22:25:05 2018 +0300 Improve log messages in SecurityMemberAccess (cherry picked from commit be1a93b0d5be48bf64927bf8c9e272d401686d7f) --- .../opensymphony/xwork2/ognl/SecurityMemberAccess.java | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java index f09cf30..e9225a0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java @@ -58,17 +58,18 @@ public class SecurityMemberAccess extends DefaultMemberAccess { @Override public boolean isAccessible(Map context, Object target, Member member, String propertyName) { LOG.debug("Checking access for [target: {}, member: {}, property: {}]", target, member, propertyName); - + +Class targetClass = target.getClass(); +Class memberClass = member.getDeclaringClass(); + if (checkEnumAccess(target, member)) { -LOG.trace("Allowing access to enum: {}", target); +LOG.trace("Allowing access to enum: target class [{}] of target [{}], member [{}]", targetClass, target, member); return true; } -Class targetClass = target.getClass(); -Class memberClass = member.getDeclaringClass(); - if (Modifier.isStatic(member.getModifiers()) && allowStaticMethodAccess) { -LOG.debug("Support for accessing static methods [target: {}, member: {}, property: {}] is deprecated!", target, member, propertyName); +LOG.debug("Support for accessing static methods [target: {}, targetClass: {}, member: {}, property: {}] is deprecated!", +target, targetClass, member, propertyName); if (!isClassExcluded(member.getDeclaringClass())) { targetClass = member.getDeclaringClass(); } @@ -81,7 +82,7 @@ public class SecurityMemberAccess extends DefaultMemberAccess { } if (isClassExcluded(targetClass)) { -LOG.warn("Target class [{}] is excluded!", target); +LOG.warn("Target class [{}] of target [{}] is excluded!", targetClass, target); return false; } @@ -91,7 +92,7 @@ public class SecurityMemberAccess extends DefaultMemberAccess { } if (disallowProxyMemberAccess && ProxyUtil.isProxyMember(member, target)) { -LOG.warn("Access to proxy [{}] is blocked!", member); +LOG.warn("Access to proxy is blocked! Target class [{}] of target [{}], member [{}]", targetClass, target, member); return false; }
[struts] 01/01: Merge pull request #298 from sepe81/fix-sonar-warnings-for-DefaultTypeConverter
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 83a0927935fde903e8b5f9ffa438cc3cca5af04d Merge: 600203b d09d3dc Author: Aleksandr Mashchenko AuthorDate: Mon Dec 31 13:12:34 2018 +0200 Merge pull request #298 from sepe81/fix-sonar-warnings-for-DefaultTypeConverter Fix sonar warnings for DefaultTypeConverter .../conversion/impl/DefaultTypeConverter.java | 56 -- .../conversion/impl/XWorkBasicConverterTest.java | 53 2 files changed, 73 insertions(+), 36 deletions(-)
[struts] branch master updated (600203b -> 83a0927)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from 600203b Merge pull request #303 from lukaszlenart/WW-4975 add 8260749 Make MILLISECOND_FORMAT static final add 0bad296 Remove the thrown NumberFormatException which is a runtime exception add cb49237 Remove commented-out lines of code add d99888d Fix warning: Use "BigDecimal.valueOf" instead add e428d8d Add the "@Override" annotation add 59e174e Simplify nested else/if add 3d120f5 Add test for convertValue with BigDecimal add ba493b4 Use parameterized Class instead of raw type add b58dc38 Add test for convertValue with BigInteger add d09d3dc Fix behaviour for convertValue with value null new 83a0927 Merge pull request #298 from sepe81/fix-sonar-warnings-for-DefaultTypeConverter The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../conversion/impl/DefaultTypeConverter.java | 56 -- .../conversion/impl/XWorkBasicConverterTest.java | 53 2 files changed, 73 insertions(+), 36 deletions(-)
[struts] branch master updated (ab810c2 -> 094b6c5)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from ab810c2 Merge pull request #297 from lukaszlenart/WW-4996 add 796c15e WW-4972 Switches incompatible_improvements to VERSION_2_3_28 add dc6a126 Merge branch 'master' of https://github.com/apache/struts into WW-4972 add c3f3d3d Merge branch 'master' of https://github.com/apache/struts into WW-4972 add 3d20e80 WW-4972 Uses built-in auto escaping instead of escaping each parameter add 3549764 WW-4972 Uses proper statement to escape JS related events add 6f05603 WW-4972 Adds two simple test cases to cover incompatible improvements add 0ecb482 WW-4972 Adds another test case to cover escaping new 094b6c5 Merge pull request #289 from lukaszlenart/WW-4972 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../template/ajaxErrorContainers/actionerror.ftl | 8 +- .../template/ajaxErrorContainers/controlfooter.ftl | 2 +- .../ajaxErrorContainers/controlheader-core.ftl | 8 +- .../src/main/webapp/WEB-INF/person/list-people.ftl | 6 +- .../tags/non-ui/actionPrefix/actionPrefix.ftl | 2 +- .../tags/non-ui/actionPrefix/methodPrefix.ftl | 2 +- .../non-ui/actionPrefix/redirectActionPrefix.ftl | 2 +- .../java/org/apache/struts2/components/UIBean.java | 4 +- .../views/freemarker/FreemarkerManager.java| 7 +- .../org/apache/struts2/dispatcher/error.ftl| 18 +-- .../main/resources/template/css_xhtml/checkbox.ftl | 10 +- .../resources/template/css_xhtml/controlfooter.ftl | 2 +- .../template/css_xhtml/controlheader-core.ftl | 6 +- .../main/resources/template/css_xhtml/label.ftl| 10 +- .../src/main/resources/template/simple/a-close.ftl | 12 +- .../main/resources/template/simple/actionerror.ftl | 8 +- .../resources/template/simple/actionmessage.ftl| 8 +- .../main/resources/template/simple/checkbox.ftl| 10 +- .../resources/template/simple/checkboxlist.ftl | 26 ++-- .../main/resources/template/simple/combobox.ftl| 20 +-- .../template/simple/common-attributes.ftl | 2 +- core/src/main/resources/template/simple/css.ftl| 10 +- core/src/main/resources/template/simple/debug.ftl | 10 +- .../resources/template/simple/doubleselect.ftl | 24 ++-- .../template/simple/dynamic-attributes.ftl | 2 +- .../main/resources/template/simple/fielderror.ftl | 14 +- core/src/main/resources/template/simple/file.ftl | 12 +- .../main/resources/template/simple/form-common.ftl | 24 ++-- core/src/main/resources/template/simple/form.ftl | 2 +- core/src/main/resources/template/simple/hidden.ftl | 8 +- .../template/simple/inputtransferselect.ftl| 40 +++--- core/src/main/resources/template/simple/label.ftl | 6 +- .../main/resources/template/simple/optgroup.ftl| 10 +- .../template/simple/optiontransferselect.ftl | 144 ++--- .../main/resources/template/simple/password.ftl| 12 +- .../main/resources/template/simple/radiomap.ftl| 18 +-- core/src/main/resources/template/simple/reset.ftl | 22 ++-- .../resources/template/simple/scripting-events.ftl | 28 ++-- core/src/main/resources/template/simple/select.ftl | 30 ++--- core/src/main/resources/template/simple/submit.ftl | 28 ++-- core/src/main/resources/template/simple/text.ftl | 16 +-- .../main/resources/template/simple/textarea.ftl| 14 +- core/src/main/resources/template/simple/token.ftl | 4 +- .../src/main/resources/template/xhtml/checkbox.ftl | 14 +- core/src/main/resources/template/xhtml/control.ftl | 4 +- .../resources/template/xhtml/controlfooter.ftl | 2 +- .../template/xhtml/controlheader-core.ftl | 8 +- .../resources/template/xhtml/controlheader.ftl | 2 +- .../main/resources/template/xhtml/form-close.ftl | 2 +- core/src/main/resources/template/xhtml/form.ftl| 4 +- core/src/main/resources/template/xhtml/tooltip.ftl | 6 +- .../views/freemarker/FreemarkerManagerTest.java| 57 .../struts2/views/jsp/ui/ActionErrorTagTest.java | 2 - ...TextField.ftl => incompatible-improvements.ftl} | 2 +- .../org/apache/struts2/views/jsp/ui/Radio-6.txt| 12 +- .../main/resources/config-browser/actionNames.ftl | 2 +- .../main/resources/config-browser/showConfig.ftl | 4 +- .../resources/config-browser/validatorDetails.ftl | 2 +- 58 files changed, 417 insertions(+), 357 deletions(-) copy core/src/test/resources/org/apache/struts2/views/freemarker/{customTextField.ftl => incompatible-improvements.ftl} (94%)
[struts] 01/01: Merge pull request #289 from lukaszlenart/WW-4972
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 094b6c5e3bc08f03447c2734c03d7b1cbfab4fdd Merge: ab810c2 0ecb482 Author: Aleksandr Mashchenko AuthorDate: Sun Jan 6 22:16:27 2019 +0200 Merge pull request #289 from lukaszlenart/WW-4972 [WW-4972] Switches incompatible_improvements to VERSION_2_3_28 .../template/ajaxErrorContainers/actionerror.ftl | 8 +- .../template/ajaxErrorContainers/controlfooter.ftl | 2 +- .../ajaxErrorContainers/controlheader-core.ftl | 8 +- .../src/main/webapp/WEB-INF/person/list-people.ftl | 6 +- .../tags/non-ui/actionPrefix/actionPrefix.ftl | 2 +- .../tags/non-ui/actionPrefix/methodPrefix.ftl | 2 +- .../non-ui/actionPrefix/redirectActionPrefix.ftl | 2 +- .../java/org/apache/struts2/components/UIBean.java | 4 +- .../views/freemarker/FreemarkerManager.java| 7 +- .../org/apache/struts2/dispatcher/error.ftl| 18 +-- .../main/resources/template/css_xhtml/checkbox.ftl | 10 +- .../resources/template/css_xhtml/controlfooter.ftl | 2 +- .../template/css_xhtml/controlheader-core.ftl | 6 +- .../main/resources/template/css_xhtml/label.ftl| 10 +- .../src/main/resources/template/simple/a-close.ftl | 12 +- .../main/resources/template/simple/actionerror.ftl | 8 +- .../resources/template/simple/actionmessage.ftl| 8 +- .../main/resources/template/simple/checkbox.ftl| 10 +- .../resources/template/simple/checkboxlist.ftl | 26 ++-- .../main/resources/template/simple/combobox.ftl| 20 +-- .../template/simple/common-attributes.ftl | 2 +- core/src/main/resources/template/simple/css.ftl| 10 +- core/src/main/resources/template/simple/debug.ftl | 10 +- .../resources/template/simple/doubleselect.ftl | 24 ++-- .../template/simple/dynamic-attributes.ftl | 2 +- .../main/resources/template/simple/fielderror.ftl | 14 +- core/src/main/resources/template/simple/file.ftl | 12 +- .../main/resources/template/simple/form-common.ftl | 24 ++-- core/src/main/resources/template/simple/form.ftl | 2 +- core/src/main/resources/template/simple/hidden.ftl | 8 +- .../template/simple/inputtransferselect.ftl| 40 +++--- core/src/main/resources/template/simple/label.ftl | 6 +- .../main/resources/template/simple/optgroup.ftl| 10 +- .../template/simple/optiontransferselect.ftl | 144 ++--- .../main/resources/template/simple/password.ftl| 12 +- .../main/resources/template/simple/radiomap.ftl| 18 +-- core/src/main/resources/template/simple/reset.ftl | 22 ++-- .../resources/template/simple/scripting-events.ftl | 28 ++-- core/src/main/resources/template/simple/select.ftl | 30 ++--- core/src/main/resources/template/simple/submit.ftl | 28 ++-- core/src/main/resources/template/simple/text.ftl | 16 +-- .../main/resources/template/simple/textarea.ftl| 14 +- core/src/main/resources/template/simple/token.ftl | 4 +- .../src/main/resources/template/xhtml/checkbox.ftl | 14 +- core/src/main/resources/template/xhtml/control.ftl | 4 +- .../resources/template/xhtml/controlfooter.ftl | 2 +- .../template/xhtml/controlheader-core.ftl | 8 +- .../resources/template/xhtml/controlheader.ftl | 2 +- .../main/resources/template/xhtml/form-close.ftl | 2 +- core/src/main/resources/template/xhtml/form.ftl| 4 +- core/src/main/resources/template/xhtml/tooltip.ftl | 6 +- .../views/freemarker/FreemarkerManagerTest.java| 57 .../struts2/views/jsp/ui/ActionErrorTagTest.java | 2 - .../freemarker/incompatible-improvements.ftl} | 6 +- .../org/apache/struts2/views/jsp/ui/Radio-6.txt| 12 +- .../main/resources/config-browser/actionNames.ftl | 2 +- .../main/resources/config-browser/showConfig.ftl | 4 +- .../resources/config-browser/validatorDetails.ftl | 2 +- 58 files changed, 419 insertions(+), 359 deletions(-)
[struts] branch master updated: WW-5001 Adds support for struts-conversion.properties files
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new fc81832 WW-5001 Adds support for struts-conversion.properties files new 3d25d2f Merge pull request #313 from lukaszlenart/WW-5001 fc81832 is described below commit fc81832e8afbe9e47f74e4f61b74733ec66892c1 Author: Lukasz Lenart AuthorDate: Tue Jan 15 08:14:12 2019 +0100 WW-5001 Adds support for struts-conversion.properties files --- .../xwork2/config/impl/DefaultConfiguration.java | 3 ++- .../providers/XWorkConfigurationProvider.java | 4 ++-- .../StrutsConversionPropertiesProcessor.java} | 24 ++ core/src/main/resources/struts-default.xml | 2 +- .../xwork2/conversion/impl/XWorkConverterTest.java | 4 ++-- ...roperties => test-struts-conversion.properties} | 0 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java index e43efaa..42cfabb 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java @@ -42,6 +42,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsConstants; +import org.apache.struts2.conversion.StrutsConversionPropertiesProcessor; import org.apache.struts2.conversion.StrutsTypeConverterHolder; import org.apache.struts2.conversion.StrutsTypeConverterCreator; @@ -256,7 +257,7 @@ public class DefaultConfiguration implements Configuration { builder.factory(ValueStackFactory.class, OgnlValueStackFactory.class, Scope.SINGLETON); builder.factory(XWorkConverter.class, Scope.SINGLETON); -builder.factory(ConversionPropertiesProcessor.class, DefaultConversionPropertiesProcessor.class, Scope.SINGLETON); +builder.factory(ConversionPropertiesProcessor.class, StrutsConversionPropertiesProcessor.class, Scope.SINGLETON); builder.factory(ConversionFileProcessor.class, DefaultConversionFileProcessor.class, Scope.SINGLETON); builder.factory(ConversionAnnotationProcessor.class, DefaultConversionAnnotationProcessor.class, Scope.SINGLETON); builder.factory(TypeConverterCreator.class, StrutsTypeConverterCreator.class, Scope.SINGLETON); diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java index 1b04864..a34a421 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java @@ -54,7 +54,7 @@ import com.opensymphony.xwork2.conversion.impl.CollectionConverter; import com.opensymphony.xwork2.conversion.impl.DateConverter; import com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor; import com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor; -import com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor; +import org.apache.struts2.conversion.StrutsConversionPropertiesProcessor; import com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer; import org.apache.struts2.conversion.StrutsTypeConverterCreator; import org.apache.struts2.conversion.StrutsTypeConverterHolder; @@ -155,7 +155,7 @@ public class XWorkConfigurationProvider implements ConfigurationProvider { .factory(XWorkConverter.class, Scope.SINGLETON) .factory(XWorkBasicConverter.class, Scope.SINGLETON) -.factory(ConversionPropertiesProcessor.class, DefaultConversionPropertiesProcessor.class, Scope.SINGLETON) +.factory(ConversionPropertiesProcessor.class, StrutsConversionPropertiesProcessor.class, Scope.SINGLETON) .factory(ConversionFileProcessor.class, DefaultConversionFileProcessor.class, Scope.SINGLETON) .factory(ConversionAnnotationProcessor.class, DefaultConversionAnnotationProcessor.class, Scope.SINGLETON) .factory(TypeConverterCreator.class, StrutsTypeConverterCreator.class, Scope.SINGLETON) diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java b/core/src/main/java/org/apache/struts2/conversion/StrutsConversionPropertiesProcessor.java similarity index 76% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionPropertiesProcessor.java rename to core/src/main/java/org/apa
[struts] 01/01: Merge pull request #290 from lukaszlenart/WW-4964
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 302b19d9682f9319585aab409237e1d6e11e7581 Merge: d31b89e e42eae0 Author: Aleksandr Mashchenko AuthorDate: Thu Dec 13 22:25:06 2018 +0200 Merge pull request #290 from lukaszlenart/WW-4964 [WW-4964] Drops duplicated import of utils.js core/src/main/resources/template/xhtml/form-validate.ftl | 1 - core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt | 1 - core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt | 1 - core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt | 1 - core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt | 1 - 5 files changed, 5 deletions(-)
[struts] branch struts-2-5-x updated: Enhancement for s:set tag for 2.5.x to allow better tag body whitespace control. (#296)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/struts-2-5-x by this push: new 6f176cc Enhancement for s:set tag for 2.5.x to allow better tag body whitespace control. (#296) 6f176cc is described below commit 6f176cc5a7ee90efe9b3dfbe477d18c2245ea583 Author: JCgH4164838Gh792C124B5 <43964333+jcgh4164838gh792c12...@users.noreply.github.com> AuthorDate: Thu Dec 20 10:59:30 2018 -0500 Enhancement for s:set tag for 2.5.x to allow better tag body whitespace control. (#296) WW-4995 Add trimBody attribute to set tag --- .../java/org/apache/struts2/components/Set.java| 6 .../java/org/apache/struts2/views/jsp/SetTag.java | 14 .../org/apache/struts2/views/jsp/SetTagTest.java | 38 ++ 3 files changed, 58 insertions(+) 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 6549454..a8233b9 100644 --- a/core/src/main/java/org/apache/struts2/components/Set.java +++ b/core/src/main/java/org/apache/struts2/components/Set.java @@ -83,6 +83,7 @@ import com.opensymphony.xwork2.util.ValueStack; public class Set extends ContextBean { protected String scope; protected String value; +protected boolean trimBody = true; public Set(ValueStack stack) { super(stack); @@ -136,6 +137,11 @@ public class Set extends ContextBean { this.value = value; } +@StrutsTagAttribute(description="Set to false to prevent the default whitespace-trim of this tag's body content", type="Boolean", defaultValue="true") +public void setTrimBody(boolean trimBody) { +this.trimBody = trimBody; +} + @Override public boolean usesBody() { return true; diff --git a/core/src/main/java/org/apache/struts2/views/jsp/SetTag.java b/core/src/main/java/org/apache/struts2/views/jsp/SetTag.java index 161ed259..f369bca 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/SetTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/SetTag.java @@ -35,6 +35,7 @@ public class SetTag extends ContextBeanTag { protected String scope; protected String value; +protected boolean trimBody = true; public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return new Set(stack); @@ -59,4 +60,17 @@ public class SetTag extends ContextBeanTag { public void setValue(String value) { this.value = value; } + +public void setTrimBody(boolean trimBody) { +this.trimBody = trimBody; +} + +@Override +protected String getBody() { +if (trimBody) { +return super.getBody(); +} else { +return (bodyContent == null ? "" : bodyContent.getString()); +} +} } diff --git a/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java index e5eba5e..16e56f2 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java @@ -18,6 +18,8 @@ */ package org.apache.struts2.views.jsp; +import com.mockobjects.servlet.MockJspWriter; +import java.io.IOException; import javax.servlet.jsp.JspException; @@ -83,6 +85,42 @@ public class SetTagTest extends AbstractUITagTest { assertEquals(chewie, context.get("chewie")); } +public void testSetTrimBody() throws JspException, IOException { +final String beginEndSpaceString = " Preceding and trailing spaces. "; +final String trimmedBeginEndSpaceString = beginEndSpaceString.trim(); +StrutsMockBodyContent mockBodyContent; + +tag.setName("foo"); +tag.setValue(null); +// Do not set any value - default for tag should be true +mockBodyContent = new StrutsMockBodyContent(new MockJspWriter()); +mockBodyContent.setString(beginEndSpaceString); +tag.setBodyContent(mockBodyContent); +tag.doStartTag(); +tag.doEndTag(); +assertEquals(trimmedBeginEndSpaceString, context.get("foo")); + +tag.setName("foo"); +tag.setValue(null); +tag.setTrimBody(true); +mockBodyContent = new StrutsMockBodyContent(new MockJspWriter()); +mockBodyContent.setString(beginEndSpaceString); +tag.setBodyContent(mockBodyContent); +tag.doStartTag(); +tag.doEndTag(); +assertEquals(trimmedBeginEndSpaceString, context.get("foo")); + +tag.setName("foo"); +tag.setValue(null); +tag.setTrimBody(false); +mockBodyContent = new StrutsMockBo
[struts] 01/01: Merge pull request #300 from lukaszlenart/WW-4938-fix
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 45e2dd4632f9c4aa5fe3711c030cdee51f50baa8 Merge: ee759d2 f9272f8 Author: Aleksandr Mashchenko AuthorDate: Sun Dec 23 22:06:46 2018 +0200 Merge pull request #300 from lukaszlenart/WW-4938-fix [WW-4938] Reverts dropping injecting internal beans in Spring Factory .../main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
[struts] branch master updated (ee759d2 -> 45e2dd4)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from ee759d2 Add generated tag html add f9272f8 WW-4938 Reverts dropping injecting internal beans in Spring Factory new 45e2dd4 Merge pull request #300 from lukaszlenart/WW-4938-fix The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
[struts] branch struts-2-5-x updated (3609279 -> b431755)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git. from 3609279 Enhance after_success for Travis CI new d33930f WW-4987 Add listCssClass to optgroup tag new 2f99110 WW-4987 Add test for listCssClass in optgroup tag new 264e03b Add listCssStyle to optgroup tag new 1d49a06 Add listTitle to optgroup tag new c694c6f Improve optgroup template new b431755 Improve optgroup list attributes test The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/struts2/components/OptGroup.java| 15 .../apache/struts2/views/jsp/ui/OptGroupTag.java | 18 ++ .../main/resources/template/simple/optgroup.ftl| 36 ++- core/src/site/resources/tags/optgroup.html | 24 + .../apache/struts2/views/jsp/ui/OptGroupTest.java | 36 +++ .../org/apache/struts2/views/jsp/ui/OptGroup-8.txt | 40 ++ 6 files changed, 161 insertions(+), 8 deletions(-) create mode 100644 core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-8.txt
[struts] 01/06: WW-4987 Add listCssClass to optgroup tag
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit d33930f3bdb969e3899f28105b7e799cea0f0f2b Author: Aleksandr Mashchenko AuthorDate: Tue Dec 4 22:25:15 2018 +0200 WW-4987 Add listCssClass to optgroup tag --- .../org/apache/struts2/components/OptGroup.java| 5 + .../apache/struts2/views/jsp/ui/OptGroupTag.java | 6 ++ .../main/resources/template/simple/optgroup.ftl| 24 ++ core/src/site/resources/tags/optgroup.html | 8 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/OptGroup.java b/core/src/main/java/org/apache/struts2/components/OptGroup.java index 58d0b9a..8e992ca 100644 --- a/core/src/main/java/org/apache/struts2/components/OptGroup.java +++ b/core/src/main/java/org/apache/struts2/components/OptGroup.java @@ -140,4 +140,9 @@ public class OptGroup extends Component { public void setListValue(String listValue) { internalUiBean.setListValue(listValue); } + +@StrutsTagAttribute(description = "Property of list objects to get css class from") +public void setListCssClass(String listCssClass) { +internalUiBean.setListCssClass(listCssClass); +} } diff --git a/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java b/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java index da2c1dc..443e575 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java @@ -36,6 +36,7 @@ public class OptGroupTag extends ComponentTagSupport { protected String disabled; protected String listKey; protected String listValue; +protected String listCssClass; public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return new OptGroup(stack, req, res); @@ -50,6 +51,7 @@ public class OptGroupTag extends ComponentTagSupport { optGroup.setDisabled(disabled); optGroup.setListKey(listKey); optGroup.setListValue(listValue); +optGroup.setListCssClass(listCssClass); } public void setList(String list) { @@ -71,4 +73,8 @@ public class OptGroupTag extends ComponentTagSupport { public void setListValue(String listValue) { this.listValue = listValue; } + +public void setListCssClass(String listCssClass) { +this.listCssClass = listCssClass; +} } diff --git a/core/src/main/resources/template/simple/optgroup.ftl b/core/src/main/resources/template/simple/optgroup.ftl index f1f8a3e..9a4d3a7 100644 --- a/core/src/main/resources/template/simple/optgroup.ftl +++ b/core/src/main/resources/template/simple/optgroup.ftl @@ -21,27 +21,35 @@ <#if parameters.optGroupInternalListUiBeanList??> <#assign optGroupInternalListUiBeans=parameters.optGroupInternalListUiBeanList /> <#list optGroupInternalListUiBeans as optGroupInternalListUiBean> - <#if optGroupInternalListUiBean.parameters.label?has_content> - label="${optGroupInternalListUiBean.parameters.label}" + label="${optGroupInternalListUiBean.parameters.label}"<#rt> <#if optGroupInternalListUiBean.parameters.disabled!false> - disabled="disabled" + disabled="disabled"<#rt> <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> > - <#list optGroupInternalListUiBean.parameters.list as optGroupBean> <#assign trash=stack.push(optGroupBean) /> <#assign tmpKey=stack.findValue(optGroupInternalListUiBean.parameters.listKey) /> <#assign tmpValue=stack.findValue(optGroupInternalListUiBean.parameters.listValue) /> <#assign tmpKeyStr = tmpKey.toString() /> - + <#if optGroupInternalListUiBean.parameters.listCssClass??> + <#if stack.findString(optGroupInternalListUiBean.parameters.listCssClass)??> + <#assign optGroupItemCssClass= stack.findString(optGroupInternalListUiBean.parameters.listCssClass)/> + + + <#if tag.contains(parameters.nameValue, tmpKey) == true> - selected="selected" + selected="selected"<#rt> + + <#if optGroupItemCssClass?has_content> + class="${optGroupItemCssClass?html}"<#rt/> - >${tmpValue?html} - + >${tmpValue?html}<#t> + <#lt> <#assign trash=stack.pop() /> diff --git a/core/src/site/resources/tags/optgroup.html b/core/src/site/resources/tags/optgroup.html index
[struts] 05/06: Improve optgroup template
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit c694c6fdfbe8ff67d95b08dc84b917a654a7e820 Author: Aleksandr Mashchenko AuthorDate: Wed Dec 5 21:51:08 2018 +0200 Improve optgroup template (cherry picked from commit 60dfc4d141cb08d2bc8b975cdd821b79d1bba24f) --- core/src/main/resources/template/simple/optgroup.ftl | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/core/src/main/resources/template/simple/optgroup.ftl b/core/src/main/resources/template/simple/optgroup.ftl index a424fe7..fc4c78f 100644 --- a/core/src/main/resources/template/simple/optgroup.ftl +++ b/core/src/main/resources/template/simple/optgroup.ftl @@ -37,21 +37,15 @@ <#assign tmpKeyStr = tmpKey.toString() /> <#assign optGroupItemCssClass = ''/> <#if optGroupInternalListUiBean.parameters.listCssClass??> - <#if stack.findString(optGroupInternalListUiBean.parameters.listCssClass)??> - <#assign optGroupItemCssClass= stack.findString(optGroupInternalListUiBean.parameters.listCssClass)/> - + <#assign optGroupItemCssClass= stack.findString(optGroupInternalListUiBean.parameters.listCssClass)!''/> <#assign optGroupItemCssStyle = ''/> <#if optGroupInternalListUiBean.parameters.listCssStyle??> - <#if stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)??> - <#assign optGroupItemCssStyle= stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)/> - + <#assign optGroupItemCssStyle= stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)!''/> <#assign optGroupItemTitle = ''/> <#if optGroupInternalListUiBean.parameters.listTitle??> - <#if stack.findString(optGroupInternalListUiBean.parameters.listTitle)??> - <#assign optGroupItemTitle= stack.findString(optGroupInternalListUiBean.parameters.listTitle)/> - + <#assign optGroupItemTitle= stack.findString(optGroupInternalListUiBean.parameters.listTitle)!''/> <#if tag.contains(parameters.nameValue, tmpKey) == true>
[struts] 02/06: WW-4987 Add test for listCssClass in optgroup tag
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit 2f99110189513b594da1217f8e18a783536f2f56 Author: Aleksandr Mashchenko AuthorDate: Tue Dec 4 22:26:26 2018 +0200 WW-4987 Add test for listCssClass in optgroup tag (cherry picked from commit 94210a02e73a32a0e20d111ac8270191ee2cb5d6) --- .../apache/struts2/views/jsp/ui/OptGroupTest.java | 29 .../org/apache/struts2/views/jsp/ui/OptGroup-8.txt | 40 ++ 2 files changed, 69 insertions(+) diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java index d4bd0e2..81c0e12 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java @@ -253,4 +253,33 @@ public class OptGroupTest extends AbstractUITagTest { verify(SelectTag.class.getResource("OptGroup-6.txt")); } +public void testOptGroupListCssClass() throws Exception { +SelectTag selectTag = new SelectTag(); +selectTag.setName("mySelection"); +selectTag.setLabel("My Selection"); +selectTag.setList("%{#{'ONE':'one','TWO':'two','THREE':'three'}}"); +selectTag.setListCssClass("'option-css-class'"); + +OptGroupTag optGroupTag1 = new OptGroupTag(); +optGroupTag1.setLabel("My Label 1"); +optGroupTag1.setList("%{#{'AAA':'aaa','BBB':'bbb','CCC':'ccc'}}"); +optGroupTag1.setListCssClass("'optgroup-option-css-class'"); + +OptGroupTag optGroupTag2 = new OptGroupTag(); +optGroupTag2.setLabel("My Label 2"); +optGroupTag2.setList("%{#{'DDD':'ddd','EEE':'eee','FFF':'fff'}}"); + +selectTag.setPageContext(pageContext); +selectTag.doStartTag(); +optGroupTag1.setPageContext(pageContext); +optGroupTag1.doStartTag(); +optGroupTag1.doEndTag(); +optGroupTag2.setPageContext(pageContext); +optGroupTag2.doStartTag(); +optGroupTag2.doEndTag(); +selectTag.doEndTag(); + +//System.out.println(writer.toString()); +verify(SelectTag.class.getResource("OptGroup-8.txt")); +} } diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-8.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-8.txt new file mode 100644 index 000..bc2c30f --- /dev/null +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-8.txt @@ -0,0 +1,40 @@ + +My Selection: + + +one +two +three + + + +aaa + +bbb + +ccc + + + + +ddd + +eee + +fff + + + + + +
[struts] 04/06: Add listTitle to optgroup tag
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit 1d49a062725a8eada6b96dac38cf9978a59b3340 Author: Aleksandr Mashchenko AuthorDate: Tue Dec 4 23:02:31 2018 +0200 Add listTitle to optgroup tag (cherry picked from commit 123a0906ce455c8ea7dc6a7580159a614c0b46bb) --- .../main/java/org/apache/struts2/components/OptGroup.java| 5 + .../java/org/apache/struts2/views/jsp/ui/OptGroupTag.java| 6 ++ core/src/main/resources/template/simple/optgroup.ftl | 9 + core/src/site/resources/tags/optgroup.html | 8 .../java/org/apache/struts2/views/jsp/ui/OptGroupTest.java | 2 ++ .../resources/org/apache/struts2/views/jsp/ui/OptGroup-8.txt | 12 ++-- 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/OptGroup.java b/core/src/main/java/org/apache/struts2/components/OptGroup.java index 3042989..28c6783 100644 --- a/core/src/main/java/org/apache/struts2/components/OptGroup.java +++ b/core/src/main/java/org/apache/struts2/components/OptGroup.java @@ -150,4 +150,9 @@ public class OptGroup extends Component { public void setListCssStyle(String listCssStyle) { internalUiBean.setListCssStyle(listCssStyle); } + +@StrutsTagAttribute(description = "Property of list objects to get title from") +public void setListTitle(String listTitle) { +internalUiBean.setListTitle(listTitle); +} } diff --git a/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java b/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java index 870c754..bd90ff5 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java @@ -38,6 +38,7 @@ public class OptGroupTag extends ComponentTagSupport { protected String listValue; protected String listCssClass; protected String listCssStyle; +protected String listTitle; public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return new OptGroup(stack, req, res); @@ -54,6 +55,7 @@ public class OptGroupTag extends ComponentTagSupport { optGroup.setListValue(listValue); optGroup.setListCssClass(listCssClass); optGroup.setListCssStyle(listCssStyle); +optGroup.setListTitle(listTitle); } public void setList(String list) { @@ -83,4 +85,8 @@ public class OptGroupTag extends ComponentTagSupport { public void setListCssStyle(String listCssStyle) { this.listCssStyle = listCssStyle; } + +public void setListTitle(String listTitle) { +this.listTitle = listTitle; +} } diff --git a/core/src/main/resources/template/simple/optgroup.ftl b/core/src/main/resources/template/simple/optgroup.ftl index 0f04f21..a424fe7 100644 --- a/core/src/main/resources/template/simple/optgroup.ftl +++ b/core/src/main/resources/template/simple/optgroup.ftl @@ -47,6 +47,12 @@ <#assign optGroupItemCssStyle= stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)/> + <#assign optGroupItemTitle = ''/> + <#if optGroupInternalListUiBean.parameters.listTitle??> + <#if stack.findString(optGroupInternalListUiBean.parameters.listTitle)??> + <#assign optGroupItemTitle= stack.findString(optGroupInternalListUiBean.parameters.listTitle)/> + + <#if tag.contains(parameters.nameValue, tmpKey) == true> selected="selected"<#rt> @@ -57,6 +63,9 @@ <#if optGroupItemCssStyle?has_content> style="${optGroupItemCssStyle?html}"<#rt/> + <#if optGroupItemTitle?has_content> + title="${optGroupItemTitle?html}"<#rt/> + >${tmpValue?html}<#t> <#lt> <#assign trash=stack.pop() /> diff --git a/core/src/site/resources/tags/optgroup.html b/core/src/site/resources/tags/optgroup.html index 111fdae..5a57e95 100644 --- a/core/src/site/resources/tags/optgroup.html +++ b/core/src/site/resources/tags/optgroup.html @@ -82,6 +82,14 @@ Please do not edit it directly. Set the listKey attribute. + listTitle + false + + false + String + Property of list objects to get title from + +