[struts] branch master updated: fix travis build URL
This is an automated email from the ASF dual-hosted git repository. sdutry 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 c55d6b7 fix travis build URL c55d6b7 is described below commit c55d6b782d1ef20f41a9553c8247bb5241de30ee Author: Stefaan Dutry AuthorDate: Tue Sep 28 14:26:06 2021 +0200 fix travis build URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3356c13..04ecf1d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The Apache Struts web framework --- [![Build Status @ Jenkins](https://builds.apache.org/buildStatus/icon?job=Struts%2FStruts+Core%2Fmaster)](https://ci-builds.apache.org/job/Struts/job/Struts%20Core/job/master/) -[![Build Status @ Travis](https://travis-ci.com/apache/struts.svg?branch=master)](https://travis-ci.com/apache/struts) +[![Build Status @ Travis](https://travis-ci.com/apache/struts.svg?branch=master)](https://app.travis-ci.com/apache/struts) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/) [![Javadocs](https://javadoc.io/badge/org.apache.struts/struts2-core.svg)](https://javadoc.io/doc/org.apache.struts/struts2-core) [![Coverage Status](https://coveralls.io/repos/github/apache/struts/badge.svg)](https://coveralls.io/github/apache/struts)
[struts] 01/01: Merge pull request #225 from sdutry/WW-4926
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 1bf7283be0a8a27af2b8c5dca76cfb71ac72023b Merge: a86524e 34ea4c1 Author: Stefaan Dutry <stefaan.du...@gmail.com> AuthorDate: Wed May 23 22:40:05 2018 +0200 Merge pull request #225 from sdutry/WW-4926 update commons-beanutils dependency to version 1.9.3 pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact sdu...@apache.org.
[struts] branch master updated (a86524e -> 1bf7283)
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from a86524e Merge pull request #224 from sdutry/WW-4779 add 34ea4c1 update commons-beanutils dependency to version 1.9.3 new 1bf7283 Merge pull request #225 from sdutry/WW-4926 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: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact sdu...@apache.org.
[struts-site] 01/01: Merge pull request #96 from fanofxiaofeng/master
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit 0d4e5ada3c592f6a4c50e3133b813f453249d0c6 Merge: 245a637 0271e74 Author: Stefaan Dutry <stefaan.du...@gmail.com> AuthorDate: Sat Jan 13 19:14:58 2018 +0100 Merge pull request #96 from fanofxiaofeng/master three trivial changes source/getting-started/debugging-struts.md | 2 +- source/getting-started/exception-handling.md | 2 +- source/getting-started/message-resource-files.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- To stop receiving notification emails like this one, please contact "commits@struts.apache.org" <commits@struts.apache.org>.
[struts-site] branch master updated (245a637 -> 0d4e5ad)
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 245a637 Merge pull request #95 from fanofxiaofeng/patch-19 add 0271e74 three trivial changes new 0d4e5ad Merge pull request #96 from fanofxiaofeng/master 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/getting-started/debugging-struts.md | 2 +- source/getting-started/exception-handling.md | 2 +- source/getting-started/message-resource-files.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts] 01/01: Merge pull request #198 from sdutry/formatting-changes
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit a66f92c66d9cb039716d7e6e893d2f3ed404e076 Merge: f803ddb 08c058e Author: Stefaan Dutry <stefaan.du...@gmail.com> AuthorDate: Fri Jan 5 20:25:24 2018 +0100 Merge pull request #198 from sdutry/formatting-changes add tests to UIBean class .../org/apache/struts2/components/UIBeanTest.java | 26 ++ 1 file changed, 26 insertions(+) -- To stop receiving notification emails like this one, please contact "commits@struts.apache.org" <commits@struts.apache.org>.
[struts] branch master updated (f803ddb -> a66f92c)
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from f803ddb Merge pull request #197 from sdutry/formatting-changes add cd0773f add test for setClass method add 08c058e add test for setStyle method new a66f92c Merge pull request #198 from sdutry/formatting-changes 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/UIBeanTest.java | 26 ++ 1 file changed, 26 insertions(+) -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts-examples] branch master updated (41bfd82 -> 1998893)
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-examples.git. from 41bfd82 Merge pull request #22 from fanofxiaofeng/patch-2 add ab98a5e replace 'the' with 'then' in 8 struts.xml files new 1998893 Merge pull request #23 from fanofxiaofeng/master 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: coding-actions/src/main/resources/struts.xml | 2 +- debugging-struts/src/main/resources/struts.xml | 4 ++-- exception-handling/src/main/resources/struts.xml | 4 ++-- form-processing/src/main/resources/struts.xml| 2 +- form-validation/src/main/resources/struts.xml| 4 ++-- http-session/src/main/resources/struts.xml | 4 ++-- message-resource/src/main/resources/struts.xml | 4 ++-- using-tags/src/main/resources/struts.xml | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts] branch master updated (9b9bd21 -> 80698ed)
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from 9b9bd21 [maven-release-plugin] prepare for next development iteration add 0bde78c changed Map iterations to use entrySet when both key and value are used add 87967b9 changed Map iteration to use entrySet add 00b5f43 changed tabs into spaces new 80698ed Merge pull request #186 from sdutry/sonar-entrySet 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: .../opensymphony/xwork2/config/impl/AbstractMatcher.java | 10 +- .../xwork2/config/impl/ActionConfigMatcher.java | 4 ++-- .../xwork2/config/impl/DefaultConfiguration.java | 10 +- .../xwork2/config/providers/InterceptorBuilder.java | 12 ++-- .../xwork2/conversion/impl/XWorkConverter.java| 4 ++-- .../xwork2/interceptor/ParameterFilterInterceptor.java| 6 -- .../xwork2/interceptor/ParametersInterceptor.java | 15 --- .../main/java/org/apache/struts2/components/UIBean.java | 6 -- .../multipart/JakartaStreamMultiPartRequest.java | 4 ++-- .../apache/struts2/interceptor/CheckboxInterceptor.java | 14 +- .../java/org/apache/struts2/result/PostbackResult.java| 5 +++-- .../struts2/views/freemarker/FreemarkerManager.java | 4 ++-- .../convention/PackageBasedActionConfigBuilder.java | 8 .../org/apache/struts2/views/java/XHTMLTagSerializer.java | 7 --- .../main/java/org/apache/struts2/json/JSONCleaner.java| 3 +-- .../java/org/apache/struts2/osgi/host/BaseOsgiHost.java | 11 ++- .../org/apache/struts2/portlet/util/PortletUrlHelper.java | 5 +++-- .../tiles/StrutsWildcardServletApplicationContext.java| 7 +++ 18 files changed, 73 insertions(+), 62 deletions(-) -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts] 01/01: Merge pull request #186 from sdutry/sonar-entrySet
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 80698ed516ff83d02149c58b03246945f6316eae Merge: 9b9bd21 00b5f43 Author: Stefaan Dutry <stefaan.du...@gmail.com> AuthorDate: Fri Dec 1 20:46:00 2017 +0100 Merge pull request #186 from sdutry/sonar-entrySet changed Map iterations to use entrySet when both key and value are used .../opensymphony/xwork2/config/impl/AbstractMatcher.java | 10 +- .../xwork2/config/impl/ActionConfigMatcher.java | 4 ++-- .../xwork2/config/impl/DefaultConfiguration.java | 10 +- .../xwork2/config/providers/InterceptorBuilder.java | 12 ++-- .../xwork2/conversion/impl/XWorkConverter.java| 4 ++-- .../xwork2/interceptor/ParameterFilterInterceptor.java| 6 -- .../xwork2/interceptor/ParametersInterceptor.java | 15 --- .../main/java/org/apache/struts2/components/UIBean.java | 6 -- .../multipart/JakartaStreamMultiPartRequest.java | 4 ++-- .../apache/struts2/interceptor/CheckboxInterceptor.java | 14 +- .../java/org/apache/struts2/result/PostbackResult.java| 5 +++-- .../struts2/views/freemarker/FreemarkerManager.java | 4 ++-- .../convention/PackageBasedActionConfigBuilder.java | 8 .../org/apache/struts2/views/java/XHTMLTagSerializer.java | 7 --- .../main/java/org/apache/struts2/json/JSONCleaner.java| 3 +-- .../java/org/apache/struts2/osgi/host/BaseOsgiHost.java | 11 ++- .../org/apache/struts2/portlet/util/PortletUrlHelper.java | 5 +++-- .../tiles/StrutsWildcardServletApplicationContext.java| 7 +++ 18 files changed, 73 insertions(+), 62 deletions(-) -- To stop receiving notification emails like this one, please contact "commits@struts.apache.org" <commits@struts.apache.org>.
[struts-site] 01/01: Merge pull request #45 from dongido001/patch-1
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git commit b6d997f800c356abf1092ed628152bb97e49f181 Merge: 4fd0992 65a4c2e Author: Stefaan Dutry <stefaan.du...@gmail.com> AuthorDate: Fri Dec 1 20:40:58 2017 +0100 Merge pull request #45 from dongido001/patch-1 typo in code fragment source/getting-started/http-session.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact "commits@struts.apache.org" <commits@struts.apache.org>.
[struts-site] branch master updated (4fd0992 -> b6d997f)
This is an automated email from the ASF dual-hosted git repository. sdutry pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git. from 4fd0992 Fixes wrong link to Version Notes add 65a4c2e typo new b6d997f Merge pull request #45 from dongido001/patch-1 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/getting-started/http-session.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
[struts] branch master updated: WW-4851 upgrade Log4j2 to version 2.9.1
This is an automated email from the ASF dual-hosted git repository. sdutry 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 025aba9 WW-4851 upgrade Log4j2 to version 2.9.1 025aba9 is described below commit 025aba98fe4bcffe4d68d0992a644d373c80d764 Author: Stefaan Dutry <stefaan.du...@gmail.com> AuthorDate: Thu Nov 9 20:11:11 2017 +0100 WW-4851 upgrade Log4j2 to version 2.9.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a391aa..64a7095 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ 5.2 3.0.7 1.0.6 -2.9.0 +2.9.1 1.6 -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].
struts git commit: WW-4851 Upgrade to Log4j2 2.9.0
Repository: struts Updated Branches: refs/heads/master b25fe95ee -> bca42a209 WW-4851 Upgrade to Log4j2 2.9.0 Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/bca42a20 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/bca42a20 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/bca42a20 Branch: refs/heads/master Commit: bca42a2091588117c1df6e365b24cca00be4c417 Parents: b25fe95 Author: Stefaan DutryAuthored: Wed Sep 6 20:28:00 2017 +0200 Committer: Stefaan Dutry Committed: Wed Sep 6 20:28:00 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/bca42a20/pom.xml -- diff --git a/pom.xml b/pom.xml index ed81aaa..5af929e 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 5.2 3.0.7 1.0.6 -2.8.2 +2.9.0 ${project.build.directory}/site
struts git commit: WW-4834 Improve RegEx used to validate URLs
Repository: struts Updated Branches: refs/heads/master 7f90a4fec -> 9d47af6ff WW-4834 Improve RegEx used to validate URLs Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9d47af6f Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9d47af6f Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9d47af6f Branch: refs/heads/master Commit: 9d47af6ffa355977b5acc713e6d1f25fac260a28 Parents: 7f90a4f Author: Stefaan DutryAuthored: Tue Aug 1 17:33:53 2017 +0200 Committer: Stefaan Dutry Committed: Tue Aug 1 17:33:53 2017 +0200 -- .../validator/validators/URLValidator.java | 23 ++-- 1 file changed, 11 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/9d47af6f/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java b/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java index 6cf58ef..b61f786 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java +++ b/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java @@ -48,19 +48,18 @@ public class URLValidator extends FieldValidatorSupport { private static final Logger LOG = LogManager.getLogger(URLValidator.class); -public static final String DEFAULT_URL_REGEX = "^(https?|ftp):\\/\\/" + -"(([a-z0-9$_\\.\\+!\\*\\'\\(\\),;\\?&=\\-]|%[0-9a-f]{2})+" + -"(:([a-z0-9$_\\.\\+!\\*\\'\\(\\),;\\?&=\\-]|%[0-9a-f]{2})+)?" + -"@)?(#?" + -")((([a-z0-9]\\.|[a-z0-9][a-z0-9-]*[a-z0-9]\\.)*" + +public static final String DEFAULT_URL_REGEX = "^(?:https?|ftp)://" + +"(?:(?:[a-z0-9$_.+!*'(),;?&=\\-]|%[0-9a-f]{2})+" + +"(?::(?:[a-z0-9$_.+!*'(),;?&=\\-]|%[0-9a-f]{2})+)?" + +"@)?#?" + +"(?:(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)*" + "[a-z][a-z0-9-]*[a-z0-9]" + -"|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}" + -"(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])" + -")(:\\d+)?" + -")(((\\/([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=\\-]|%[0-9a-f]{2})*)*" + - "(\\?([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=\\-\\/\\:]|%[0-9a-f]{2})*)" + -"?)?)?" + -"(#([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=\\-]|%[0-9a-f]{2})*)?" + +"|(?:[1-9]?\\d|1\\d{2}|2[0-4]\\d|25[0-5]\\.){3}" + +"[1-9]?\\d|1\\d{2}|2[0-4]\\d|25[0-5]" + +")(?::\\d+)?" + +")(?:(?:/(?:[a-z0-9$_.+!*'(),;:@&=\\-]|%[0-9a-f]{2})*)*" + +"(?:\\?(?:[a-z0-9$_.+!*'(),;:@&=\\-/:]|%[0-9a-f]{2})*)?)?" + +"(?:#(?:[a-z0-9$_.+!*'(),;:@&=\\-]|%[0-9a-f]{2})*)?" + "$"; private String urlRegexExpression;
[1/2] struts git commit: WW-4818 change default Multipart validation regex to comply with RFC1341
Repository: struts Updated Branches: refs/heads/master 06c858386 -> bbbe2a803 WW-4818 change default Multipart validation regex to comply with RFC1341 Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/68d52dbe Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/68d52dbe Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/68d52dbe Branch: refs/heads/master Commit: 68d52dbe42aebc8e24379ebfaf4f306dd261b91c Parents: 06c8583 Author: Stefaan DutryAuthored: Tue Jul 25 13:05:07 2017 +0200 Committer: Stefaan Dutry Committed: Tue Jul 25 13:05:07 2017 +0200 -- core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/68d52dbe/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java index 55707a4..97e2149 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java @@ -88,7 +88,7 @@ public class Dispatcher { */ public static final String REQUEST_POST_METHOD = "POST"; -public static final String MULTIPART_FORM_DATA_REGEX = "^multipart\\/form-data(; boundary=[\\-a-zA-Z0-9]{1,70})?"; +public static final String MULTIPART_FORM_DATA_REGEX = "^multipart/form-data(; boundary=[0-9a-zA-Z'()+_,\\-./:=?]{1,70})?"; /** * Provide a thread local instance.
[2/2] struts git commit: WW-4818 added a couple of simple tests for MULTIPART_FORM_DATA_REGEX
WW-4818 added a couple of simple tests for MULTIPART_FORM_DATA_REGEX Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/bbbe2a80 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/bbbe2a80 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/bbbe2a80 Branch: refs/heads/master Commit: bbbe2a80356811ff4dbaa99da2417a067eb614cc Parents: 68d52db Author: Stefaan DutryAuthored: Tue Jul 25 14:30:07 2017 +0200 Committer: Stefaan Dutry Committed: Tue Jul 25 14:30:07 2017 +0200 -- .../struts2/dispatcher/DispatcherTest.java | 26 1 file changed, 26 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts/blob/bbbe2a80/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java -- diff --git a/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java b/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java index 0f430de..4f043cb 100644 --- a/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java +++ b/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java @@ -146,6 +146,32 @@ public class DispatcherTest extends StrutsInternalTestCase { assertTrue(wrapped instanceof MultiPartRequestWrapper); } +public void testPrepareMultipartRequestAllAllowedCharacters() throws Exception { +MockHttpServletRequest req = new MockHttpServletRequest(); +MockHttpServletResponse res = new MockHttpServletResponse(); + +req.setMethod("post"); +req.setContentType("multipart/form-data; boundary=01=23a.bC:D((e)d'z?p+o_r,e-"); +Dispatcher du = initDispatcher(Collections. emptyMap()); +du.prepare(req, res); +HttpServletRequest wrapped = du.wrapRequest(req); + +assertTrue(wrapped instanceof MultiPartRequestWrapper); +} + +public void testPrepareMultipartRequestIllegalCharacter() throws Exception { +MockHttpServletRequest req = new MockHttpServletRequest(); +MockHttpServletResponse res = new MockHttpServletResponse(); + +req.setMethod("post"); +req.setContentType("multipart/form-data; boundary=01=2;3a.bC:D((e)d'z?p+o_r,e-"); +Dispatcher du = initDispatcher(Collections. emptyMap()); +du.prepare(req, res); +HttpServletRequest wrapped = du.wrapRequest(req); + +assertFalse(wrapped instanceof MultiPartRequestWrapper); +} + public void testDispatcherListener() throws Exception { final DispatcherListenerState state = new DispatcherListenerState();
struts git commit: WW-4819 fixed commons-collections groupId in dependency management
Repository: struts Updated Branches: refs/heads/master f9e4fe483 -> 06c858386 WW-4819 fixed commons-collections groupId in dependency management Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/06c85838 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/06c85838 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/06c85838 Branch: refs/heads/master Commit: 06c858386760687e276bb5bd310996ad633990a2 Parents: f9e4fe4 Author: Stefaan DutryAuthored: Mon Jul 24 23:19:58 2017 +0200 Committer: Stefaan Dutry Committed: Mon Jul 24 23:27:15 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/06c85838/pom.xml -- diff --git a/pom.xml b/pom.xml index c45da95..55dcfb8 100644 --- a/pom.xml +++ b/pom.xml @@ -701,7 +701,7 @@ -org.apache.commons +commons-collections commons-collections 3.2.2
struts git commit: WW-4821 Upgrade Commons IO to 2.5
Repository: struts Updated Branches: refs/heads/master 6d82cdb49 -> f9e4fe483 WW-4821 Upgrade Commons IO to 2.5 Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f9e4fe48 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f9e4fe48 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f9e4fe48 Branch: refs/heads/master Commit: f9e4fe483630dd0e9b37acdca4e0db5479110b56 Parents: 6d82cdb Author: Stefaan DutryAuthored: Sun Jul 23 10:38:16 2017 +0200 Committer: Stefaan Dutry Committed: Sun Jul 23 10:38:16 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/f9e4fe48/pom.xml -- diff --git a/pom.xml b/pom.xml index d6e9648..c45da95 100644 --- a/pom.xml +++ b/pom.xml @@ -713,7 +713,7 @@ commons-io commons-io -2.4 +2.5 org.apache.commons
struts-site git commit: updated processing-forms page
Repository: struts-site Updated Branches: refs/heads/master 0302c2dbd -> 2da7dfa6d updated processing-forms 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/2da7dfa6 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/2da7dfa6 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/2da7dfa6 Branch: refs/heads/master Commit: 2da7dfa6dad7d3c1a6ab1c2b45196fd3790542da Parents: 0302c2d Author: Stefaan DutryAuthored: Mon May 1 09:10:59 2017 +0200 Committer: Stefaan Dutry Committed: Mon May 1 09:10:59 2017 +0200 -- source/getting-started/processing-forms.md | 96 - 1 file changed, 44 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/2da7dfa6/source/getting-started/processing-forms.md -- diff --git a/source/getting-started/processing-forms.md b/source/getting-started/processing-forms.md index 27afd56..4c0c4b4 100644 --- a/source/getting-started/processing-forms.md +++ b/source/getting-started/processing-forms.md @@ -4,23 +4,23 @@ title: Processing forms --- ## Processing Forms -This tutorial assumes you've completed the [Coding Struts 2 Actons](coding-actions.html) tutorial and have a working coding_actions project. The example code for this tutorial, form_processing, is available for checkout from the Struts 2 GitHub subversion repository: [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). +This tutorial assumes you've completed the [Coding Struts 2 Actons](coding-actions.html) tutorial and have a working coding-actions project. The example code for this tutorial, form-processing, is available for checkout from the Struts 2 GitHub subversion repository: [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). > -__Introduction__ +### Introduction In this tutorial we'll explore using Struts 2 to do more involved processing of a form submission. We'll cover how to use a Java model class to store the form input and how to create the Struts 2 form to match up with that model class. -The code provided in this tutorial may be added to the [Coding Struts 2 Actions](coding-actions.html) example or you can download this complete example from Google Code - [http://code.google.com/p/struts2-examples/downloads/list](http://code.google.com/p/struts2-examples/downloads/list). +The code provided in this tutorial may be added to the [Coding Struts 2 Actions](coding-actions.html) example or you can download this complete example from the github respository - [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). The [Struts 2 user mailing list](http://struts.apache.org/mail.html) is an excellent place to get help. If you are having a problem getting the tutorial example applications to work search the Struts 2 mailing list. If you don't find an answer to your problem, post a question on the mailing list. -__Forms and A Java Model Class__ +### Forms and a Java model class For this tutorial let's say we need to provide a form that a user may submit to register for a prize drawing. Our business rules state the user must provide his/her first name, last name, email address, and age. -To encapsulate this data, we'll use a simple Java class that follows the basic Java Bean specifications (public set/get methods for each instance field). If you're following along add this class to package org.apache.struts.register.model in the [Coding Struts 2 Actions](coding-actions.html) example. +To encapsulate this data, we'll use a simple Java class that follows the basic Java Bean specifications (public set/get methods for each instance field). If you're following along add this class to the package `org.apache.struts.register.model` in the [Coding Struts 2 Actions](coding-actions.html) example. **Person.java** @@ -70,53 +70,48 @@ public class Person { } ``` -Note a few points about the above class. There is a public set/get method for each instance field. The age attribute is of type integer. We've defined a public toString method that returns a String representing the state of the object. Since we haven't specified a constructor, Java will provide a default constructor that will set all instance fields to their null values. +Note a few points about the above class. There is a public set/get method for each instance field. The age attribute is of type integer. We've defined a public `toString` method that returns a String representing the state of the object. Since we haven't specified a constructor, Java will provide a default constructor that
[4/8] struts-examples git commit: changed to html5
changed to html5 Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/83d7d5c0 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/83d7d5c0 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/83d7d5c0 Branch: refs/heads/master Commit: 83d7d5c08491cffafce7f374dde432c831eaa440 Parents: c14031c Author: Stefaan DutryAuthored: Tue Apr 25 22:33:38 2017 +0200 Committer: Stefaan Dutry Committed: Tue Apr 25 22:33:38 2017 +0200 -- form-processing/src/main/webapp/HelloWorld.jsp | 2 +- form-processing/src/main/webapp/index.jsp | 2 +- form-processing/src/main/webapp/register.jsp | 5 ++--- form-processing/src/main/webapp/thankyou.jsp | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/83d7d5c0/form-processing/src/main/webapp/HelloWorld.jsp -- diff --git a/form-processing/src/main/webapp/HelloWorld.jsp b/form-processing/src/main/webapp/HelloWorld.jsp index d207c34..5c56355 100644 --- a/form-processing/src/main/webapp/HelloWorld.jsp +++ b/form-processing/src/main/webapp/HelloWorld.jsp @@ -1,6 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/83d7d5c0/form-processing/src/main/webapp/index.jsp -- diff --git a/form-processing/src/main/webapp/index.jsp b/form-processing/src/main/webapp/index.jsp index 9d972fd..18a3bb5 100644 --- a/form-processing/src/main/webapp/index.jsp +++ b/form-processing/src/main/webapp/index.jsp @@ -1,6 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/83d7d5c0/form-processing/src/main/webapp/register.jsp -- diff --git a/form-processing/src/main/webapp/register.jsp b/form-processing/src/main/webapp/register.jsp index 647cd0c..dd4758e 100644 --- a/form-processing/src/main/webapp/register.jsp +++ b/form-processing/src/main/webapp/register.jsp @@ -1,8 +1,7 @@ - <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> -http://www.w3.org/1999/xhtml;> + + Register http://git-wip-us.apache.org/repos/asf/struts-examples/blob/83d7d5c0/form-processing/src/main/webapp/thankyou.jsp -- diff --git a/form-processing/src/main/webapp/thankyou.jsp b/form-processing/src/main/webapp/thankyou.jsp index 27f7b6a..665339f 100644 --- a/form-processing/src/main/webapp/thankyou.jsp +++ b/form-processing/src/main/webapp/thankyou.jsp @@ -1,8 +1,7 @@ - <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> -http://www.w3.org/1999/xhtml;> + + Registration Successful
[8/8] struts-examples git commit: removed extra space
removed extra space Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/04d6d838 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/04d6d838 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/04d6d838 Branch: refs/heads/master Commit: 04d6d8388eae5e858d7962bfd35a2baa7152a5b4 Parents: b5c99b5 Author: Stefaan DutryAuthored: Mon May 1 09:12:35 2017 +0200 Committer: Stefaan Dutry Committed: Mon May 1 09:12:35 2017 +0200 -- form-processing/src/main/webapp/register.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/04d6d838/form-processing/src/main/webapp/register.jsp -- diff --git a/form-processing/src/main/webapp/register.jsp b/form-processing/src/main/webapp/register.jsp index dd4758e..e6e697f 100644 --- a/form-processing/src/main/webapp/register.jsp +++ b/form-processing/src/main/webapp/register.jsp @@ -11,7 +11,7 @@ - +
[5/8] struts-examples git commit: removed manifest file
removed manifest file Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/5a46e4e5 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/5a46e4e5 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/5a46e4e5 Branch: refs/heads/master Commit: 5a46e4e5e09e655164f3daaed2fef0dbb6255419 Parents: 83d7d5c Author: Stefaan DutryAuthored: Tue Apr 25 22:43:25 2017 +0200 Committer: Stefaan Dutry Committed: Tue Apr 25 22:43:25 2017 +0200 -- form-processing/src/main/webapp/META-INF/MANIFEST.MF | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/5a46e4e5/form-processing/src/main/webapp/META-INF/MANIFEST.MF -- diff --git a/form-processing/src/main/webapp/META-INF/MANIFEST.MF b/form-processing/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e..000 --- a/form-processing/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: -
[1/8] struts-examples git commit: changed formatting of java classes
Repository: struts-examples Updated Branches: refs/heads/master 15c545e0d -> 04d6d8388 changed formatting of java classes Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/eb862b6c Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/eb862b6c Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/eb862b6c Branch: refs/heads/master Commit: eb862b6ce981af44f3220004ef285c74be41e59b Parents: 15c545e Author: Stefaan DutryAuthored: Tue Apr 25 21:02:32 2017 +0200 Committer: Stefaan Dutry Committed: Tue Apr 25 21:02:32 2017 +0200 -- .../helloworld/action/HelloWorldAction.java | 109 +-- .../struts/helloworld/model/MessageStore.java | 35 +++--- .../apache/struts/register/action/Register.java | 40 +++ .../apache/struts/register/model/Person.java| 31 ++ 4 files changed, 96 insertions(+), 119 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/eb862b6c/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 1285010..39eec33 100644 --- a/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -13,67 +13,64 @@ import org.apache.struts.helloworld.model.MessageStore; */ public class HelloWorldAction extends ActionSupport { - private static final long serialVersionUID = 1L; - - /** -* The model class that stores the message -* to display in the view. -*/ - private MessageStore messageStore; - - private static int helloCount = 0; - - public int getHelloCount() { - return helloCount; - } +private static final long serialVersionUID = 1L; + +/** + * The model class that stores the message + * to display in the view. + */ +private MessageStore messageStore; + +private static int helloCount = 0; + +public int getHelloCount() { +return helloCount; +} - public void setHelloCount(int helloCount) { - HelloWorldAction.helloCount = helloCount; - } - - private String userName; +public void setHelloCount(int helloCount) { +HelloWorldAction.helloCount = helloCount; +} + +private String userName; - public String getUserName() { - return userName; - } +public String getUserName() { +return userName; +} - public void setUserName(String userName) { - this.userName = userName; - } +public void setUserName(String userName) { +this.userName = userName; +} - /* -* Creates the MessageStore model object, -* increase helloCount by 1 and -* returns success. The MessageStore model -* object will be available to the view. -* (non-Javadoc) -* @see com.opensymphony.xwork2.ActionSupport#execute() -*/ - public String execute() throws Exception { - - messageStore = new MessageStore() ; - - //Action included a query string parameter of userName - //or a form field with name of userName - if (userName != null) { - - messageStore.setMessage( messageStore.getMessage() + " " + userName); - - } - - helloCount++; - - return SUCCESS; - } +/* + * Creates the MessageStore model object, + * increase helloCount by 1 and + * returns success. The MessageStore model + * object will be available to the view. + * (non-Javadoc) + * @see com.opensymphony.xwork2.ActionSupport#execute() + */ +public String execute() throws Exception { +messageStore = new MessageStore() ; + +//Action included a query string parameter of userName +//or a form field with name of userName +if (userName != null) { + +messageStore.setMessage( messageStore.getMessage() + " " + userName); + +} + +helloCount++; + +return SUCCESS; +} - public MessageStore getMessageStore() { - return messageStore; - } +public
[2/8] struts-examples git commit: added formatting to jsp files
added formatting to jsp files Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/2a1e6fb9 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/2a1e6fb9 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/2a1e6fb9 Branch: refs/heads/master Commit: 2a1e6fb99fed63ecf24fcd0a8e543a8dad85f1fe Parents: eb862b6 Author: Stefaan DutryAuthored: Tue Apr 25 22:06:26 2017 +0200 Committer: Stefaan Dutry Committed: Tue Apr 25 22:06:26 2017 +0200 -- form-processing/src/main/webapp/HelloWorld.jsp | 25 ++-- form-processing/src/main/webapp/index.jsp | 45 + form-processing/src/main/webapp/register.jsp | 37 - form-processing/src/main/webapp/thankyou.jsp | 24 +-- 4 files changed, 59 insertions(+), 72 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/2a1e6fb9/form-processing/src/main/webapp/HelloWorld.jsp -- diff --git a/form-processing/src/main/webapp/HelloWorld.jsp b/form-processing/src/main/webapp/HelloWorld.jsp index 286a6ab..0fc29c0 100644 --- a/form-processing/src/main/webapp/HelloWorld.jsp +++ b/form-processing/src/main/webapp/HelloWorld.jsp @@ -1,16 +1,15 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - - -Hello World! - - - -I've said hello times! - -Return to home page. - - \ No newline at end of file + + +Hello World! + + + +I've said hello times! + +Return to home page. + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/2a1e6fb9/form-processing/src/main/webapp/index.jsp -- diff --git a/form-processing/src/main/webapp/index.jsp b/form-processing/src/main/webapp/index.jsp index 091f505..7c8987d 100644 --- a/form-processing/src/main/webapp/index.jsp +++ b/form-processing/src/main/webapp/index.jsp @@ -1,30 +1,25 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - - -Basic Struts 2 Application - Welcome - - -Welcome To Struts 2! -Hello World - - Bruce Phillips - -Hello Bruce Phillips + + +Basic Struts 2 Application - Welcome + + +Welcome To Struts 2! +Hello World + + Bruce Phillips + +Hello Bruce Phillips -Get your own personal hello by filling out and submitting this form. +Get your own personal hello by filling out and submitting this form. + + + + - - - - - - - - -Please register for our prize drawing. - - \ No newline at end of file +Please register for our prize drawing. + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/2a1e6fb9/form-processing/src/main/webapp/register.jsp -- diff --git a/form-processing/src/main/webapp/register.jsp b/form-processing/src/main/webapp/register.jsp index 0adac76..c638407 100644 --- a/form-processing/src/main/webapp/register.jsp +++ b/form-processing/src/main/webapp/register.jsp @@ -1,26 +1,21 @@ <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> http://www.w3.org/1999/xhtml;> - - -Register - - -Register for a prize by completing this form. + + +Register + + +Register for a prize by completing this form. - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/2a1e6fb9/form-processing/src/main/webapp/thankyou.jsp -- diff --git a/form-processing/src/main/webapp/thankyou.jsp b/form-processing/src/main/webapp/thankyou.jsp index 3c845bc..f5f3043 100644 --- a/form-processing/src/main/webapp/thankyou.jsp +++ b/form-processing/src/main/webapp/thankyou.jsp @@ -1,19 +1,17 @@ <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page
[6/8] struts-examples git commit: removed blank lines
removed blank lines Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/b48664e7 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/b48664e7 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/b48664e7 Branch: refs/heads/master Commit: b48664e75868837233168649c80c2be31ef7055e Parents: 5a46e4e Author: Stefaan DutryAuthored: Sun Apr 30 15:45:04 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 30 15:45:04 2017 +0200 -- .../java/org/apache/struts/helloworld/action/HelloWorldAction.java | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/b48664e7/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 39eec33..95b7408 100644 --- a/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -55,9 +55,7 @@ public class HelloWorldAction extends ActionSupport { //Action included a query string parameter of userName //or a form field with name of userName if (userName != null) { - messageStore.setMessage( messageStore.getMessage() + " " + userName); - } helloCount++;
[3/8] struts-examples git commit: changed encoding to UTF-8
changed encoding to UTF-8 Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/c14031c7 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/c14031c7 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/c14031c7 Branch: refs/heads/master Commit: c14031c7d3766c40d2bf80be5da1b3c71b811b63 Parents: 2a1e6fb Author: Stefaan DutryAuthored: Tue Apr 25 22:20:47 2017 +0200 Committer: Stefaan Dutry Committed: Tue Apr 25 22:20:47 2017 +0200 -- form-processing/src/main/webapp/HelloWorld.jsp | 4 ++-- form-processing/src/main/webapp/index.jsp | 4 ++-- form-processing/src/main/webapp/register.jsp | 6 +++--- form-processing/src/main/webapp/thankyou.jsp | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c14031c7/form-processing/src/main/webapp/HelloWorld.jsp -- diff --git a/form-processing/src/main/webapp/HelloWorld.jsp b/form-processing/src/main/webapp/HelloWorld.jsp index 0fc29c0..d207c34 100644 --- a/form-processing/src/main/webapp/HelloWorld.jsp +++ b/form-processing/src/main/webapp/HelloWorld.jsp @@ -1,9 +1,9 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - + Hello World! http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c14031c7/form-processing/src/main/webapp/index.jsp -- diff --git a/form-processing/src/main/webapp/index.jsp b/form-processing/src/main/webapp/index.jsp index 7c8987d..9d972fd 100644 --- a/form-processing/src/main/webapp/index.jsp +++ b/form-processing/src/main/webapp/index.jsp @@ -1,9 +1,9 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - + Basic Struts 2 Application - Welcome http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c14031c7/form-processing/src/main/webapp/register.jsp -- diff --git a/form-processing/src/main/webapp/register.jsp b/form-processing/src/main/webapp/register.jsp index c638407..647cd0c 100644 --- a/form-processing/src/main/webapp/register.jsp +++ b/form-processing/src/main/webapp/register.jsp @@ -1,10 +1,10 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> http://www.w3.org/1999/xhtml;> - + Register http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c14031c7/form-processing/src/main/webapp/thankyou.jsp -- diff --git a/form-processing/src/main/webapp/thankyou.jsp b/form-processing/src/main/webapp/thankyou.jsp index f5f3043..27f7b6a 100644 --- a/form-processing/src/main/webapp/thankyou.jsp +++ b/form-processing/src/main/webapp/thankyou.jsp @@ -1,10 +1,10 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> http://www.w3.org/1999/xhtml;> - + Registration Successful
[7/8] struts-examples git commit: unified formatting
unified formatting Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/b5c99b5b Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/b5c99b5b Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/b5c99b5b Branch: refs/heads/master Commit: b5c99b5b958f76a59fc17b3e32467d25ce5ef587 Parents: b48664e Author: Stefaan DutryAuthored: Mon May 1 08:27:50 2017 +0200 Committer: Stefaan Dutry Committed: Mon May 1 08:27:50 2017 +0200 -- form-processing/src/main/resources/struts.xml | 39 ++ 1 file changed, 17 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/b5c99b5b/form-processing/src/main/resources/struts.xml -- diff --git a/form-processing/src/main/resources/struts.xml b/form-processing/src/main/resources/struts.xml index 8876d99..8195c32 100644 --- a/form-processing/src/main/resources/struts.xml +++ b/form-processing/src/main/resources/struts.xml @@ -1,31 +1,26 @@ http://struts.apache.org/dtds/struts-2.5.dtd;> - +"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" +"http://struts.apache.org/dtds/struts-2.5.dtd;> + - - - - + - - /index.jsp - - - - - /HelloWorld.jsp - - - - /thankyou.jsp - + +/index.jsp + - + + +/HelloWorld.jsp + - \ No newline at end of file + +/thankyou.jsp + + +
struts-site git commit: removed unused attachments
Repository: struts-site Updated Branches: refs/heads/master 315e54a32 -> 0302c2dbd removed unused attachments Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/0302c2db Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/0302c2db Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/0302c2db Branch: refs/heads/master Commit: 0302c2dbd9a8b334b663fc1cf1607d9f866c02aa Parents: 315e54a Author: Stefaan DutryAuthored: Mon Apr 24 21:18:07 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 24 21:18:07 2017 +0200 -- .../att14974990_Basic_Strut2_Ant_Structure.png | Bin 23368 -> 0 bytes .../att14974991_Basic_Struts2_Welcome.png | Bin 17245 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/0302c2db/source/getting-started/attachments/att14974990_Basic_Strut2_Ant_Structure.png -- diff --git a/source/getting-started/attachments/att14974990_Basic_Strut2_Ant_Structure.png b/source/getting-started/attachments/att14974990_Basic_Strut2_Ant_Structure.png deleted file mode 100644 index 096c54e..000 Binary files a/source/getting-started/attachments/att14974990_Basic_Strut2_Ant_Structure.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/struts-site/blob/0302c2db/source/getting-started/attachments/att14974991_Basic_Struts2_Welcome.png -- diff --git a/source/getting-started/attachments/att14974991_Basic_Struts2_Welcome.png b/source/getting-started/attachments/att14974991_Basic_Struts2_Welcome.png deleted file mode 100644 index a31fd34..000 Binary files a/source/getting-started/attachments/att14974991_Basic_Struts2_Welcome.png and /dev/null differ
[1/3] struts-site git commit: added new attachments (updated images)
Repository: struts-site Updated Branches: refs/heads/master 5b8747929 -> 315e54a32 added new attachments (updated images) Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/04b88819 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/04b88819 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/04b88819 Branch: refs/heads/master Commit: 04b88819907185ece7218d5c5dc8fb8ff7cb5483 Parents: 5b87479 Author: Stefaan DutryAuthored: Mon Apr 24 21:11:45 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 24 21:11:45 2017 +0200 -- .../coding_actions_form_submit_result.png | Bin 0 -> 14765 bytes .../coding_actions_link_with_param_result.png | Bin 0 -> 13766 bytes 2 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/04b88819/source/getting-started/attachments/coding_actions_form_submit_result.png -- diff --git a/source/getting-started/attachments/coding_actions_form_submit_result.png b/source/getting-started/attachments/coding_actions_form_submit_result.png new file mode 100644 index 000..cbe59a8 Binary files /dev/null and b/source/getting-started/attachments/coding_actions_form_submit_result.png differ http://git-wip-us.apache.org/repos/asf/struts-site/blob/04b88819/source/getting-started/attachments/coding_actions_link_with_param_result.png -- diff --git a/source/getting-started/attachments/coding_actions_link_with_param_result.png b/source/getting-started/attachments/coding_actions_link_with_param_result.png new file mode 100644 index 000..f220808 Binary files /dev/null and b/source/getting-started/attachments/coding_actions_link_with_param_result.png differ
[2/3] struts-site git commit: updated coding-actions page
updated coding-actions 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/8aea28ac Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/8aea28ac Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/8aea28ac Branch: refs/heads/master Commit: 8aea28ac88518599dc00afa455e9ab1711c05acc Parents: 04b8881 Author: Stefaan DutryAuthored: Mon Apr 24 21:12:52 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 24 21:12:52 2017 +0200 -- source/getting-started/coding-actions.md | 40 +-- 1 file changed, 20 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/8aea28ac/source/getting-started/coding-actions.md -- diff --git a/source/getting-started/coding-actions.md b/source/getting-started/coding-actions.md index 5b0fddc..d85296c 100644 --- a/source/getting-started/coding-actions.md +++ b/source/getting-started/coding-actions.md @@ -4,9 +4,9 @@ title: Coding actions --- ## Coding actions -This tutorial assumes you've completed the [Using Struts 2 Tags](#PAGE_14811875) tutorial and have a working using_tags project. The example code for this tutorial, coding_action, is available for checkout from the Struts 2 GitHub repository: [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). +This tutorial assumes you've completed the [Using Struts 2 Tags](using-tags.html) tutorial and have a working using-tags project. The example code for this tutorial, coding-actions, is available for checkout from the Struts 2 GitHub repository: [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). -__Introduction__ +### Introduction Coding a Struts 2 Action involves several parts: @@ -14,7 +14,7 @@ Coding a Struts 2 Action involves several parts: 2. Mapping a result to a view 3. Writing the controller logic in the Action class -In the previous tutorials we covered how to configure Struts to map a URL such as hello.action to a Action class such as HelloWorldAction (specifically the execute method). +In the previous tutorials we covered how to configure Struts to map a URL such as `hello.action` to an Action class such as `HelloWorldAction` (specifically the execute method). **Action Mapping** @@ -24,19 +24,19 @@ In the previous tutorials we covered how to configure Struts to map a URL such a ``` -The Action mapping above also specified that if the execute method of class HelloWorldAction returns success then the view HelloWorld.jsp will be returned to the browser. +The Action mapping above also specified that if the `execute` method of class `HelloWorldAction` returns `success` then the view `HelloWorld.jsp` will be returned to the browser. This tutorial will introduce you to the basics of writing the controller logic in the Action class. -__Struts 2 Action Classes__ +### Struts 2 Action Classes Action classes act as the controller in the MVC pattern. Action classes respond to a user action, execute business logic (or call upon other classes to do that), and then return a result that tells Struts what view to render. Struts 2 Action classes usually extend the `ActionSupport` class, which is provided by the Struts 2 framework. Class `ActionSupport` provides default implementations for the most common actions (e.g. execute, input) and also implements several useful Struts 2 interfaces. When your Action class extends class `ActionSupport` your class can either override the default implementations or inherit them. -If you examine class HelloWorldAction from tutorial [Using Struts 2 Tags](using-tags.html) you'll see that it extends class `ActionSupport` and then overrides method execute. +If you examine class HelloWorldAction from tutorial [Using Struts 2 Tags](using-tags.html) you'll see that it extends the class `ActionSupport` and then overrides method `execute`. -In method execute is where we placed what we want this controller to do in response to the hello.action. +The method `execute` is where we placed what we want this controller to do in response to the `hello.action`. **Method execute of HelloWorldAction** @@ -51,11 +51,11 @@ public String execute() throws Exception { ``` > Note that method execute declares it throws an Exception. We'll cover in a > later tutorial how to configure Struts to handle any Exceptions thrown from > the Action classes methods. -__Processing Form Input In The Action Class__ +### Processing Form Input In The Action Class -One of the most common responsibilities of the Action class is to process user input on a form and then make the result
[2/8] struts-examples git commit: removed unnecessary setter
removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/c98d0fc3 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/c98d0fc3 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/c98d0fc3 Branch: refs/heads/master Commit: c98d0fc383a3320ea0f658bcb023787fc64dfc19 Parents: 7f6f7c8 Author: Stefaan DutryAuthored: Sun Apr 23 17:57:55 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 17:57:55 2017 +0200 -- .../org/apache/struts/helloworld/action/HelloWorldAction.java| 4 1 file changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c98d0fc3/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 95b7408..71eea4b 100644 --- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -27,10 +27,6 @@ public class HelloWorldAction extends ActionSupport { return helloCount; } -public void setHelloCount(int helloCount) { -HelloWorldAction.helloCount = helloCount; -} - private String userName; public String getUserName() {
[1/8] struts-examples git commit: changed indentation in java files
Repository: struts-examples Updated Branches: refs/heads/master 51a2f1874 -> 15c545e0d changed indentation in java files Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/7f6f7c8c Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/7f6f7c8c Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/7f6f7c8c Branch: refs/heads/master Commit: 7f6f7c8c3ab05704c87a96e863124c42a47263f6 Parents: 51a2f18 Author: Stefaan DutryAuthored: Sun Apr 23 17:52:51 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 17:52:51 2017 +0200 -- .../helloworld/action/HelloWorldAction.java | 107 +-- .../struts/helloworld/model/MessageStore.java | 35 +++--- 2 files changed, 67 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7f6f7c8c/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 1285010..95b7408 100644 --- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -13,67 +13,62 @@ import org.apache.struts.helloworld.model.MessageStore; */ public class HelloWorldAction extends ActionSupport { - private static final long serialVersionUID = 1L; - - /** -* The model class that stores the message -* to display in the view. -*/ - private MessageStore messageStore; - - private static int helloCount = 0; - - public int getHelloCount() { - return helloCount; - } +private static final long serialVersionUID = 1L; + +/** + * The model class that stores the message + * to display in the view. + */ +private MessageStore messageStore; + +private static int helloCount = 0; + +public int getHelloCount() { +return helloCount; +} - public void setHelloCount(int helloCount) { - HelloWorldAction.helloCount = helloCount; - } - - private String userName; +public void setHelloCount(int helloCount) { +HelloWorldAction.helloCount = helloCount; +} + +private String userName; - public String getUserName() { - return userName; - } +public String getUserName() { +return userName; +} - public void setUserName(String userName) { - this.userName = userName; - } +public void setUserName(String userName) { +this.userName = userName; +} - /* -* Creates the MessageStore model object, -* increase helloCount by 1 and -* returns success. The MessageStore model -* object will be available to the view. -* (non-Javadoc) -* @see com.opensymphony.xwork2.ActionSupport#execute() -*/ - public String execute() throws Exception { - - messageStore = new MessageStore() ; - - //Action included a query string parameter of userName - //or a form field with name of userName - if (userName != null) { - - messageStore.setMessage( messageStore.getMessage() + " " + userName); - - } - - helloCount++; - - return SUCCESS; - } +/* + * Creates the MessageStore model object, + * increase helloCount by 1 and + * returns success. The MessageStore model + * object will be available to the view. + * (non-Javadoc) + * @see com.opensymphony.xwork2.ActionSupport#execute() + */ +public String execute() throws Exception { +messageStore = new MessageStore() ; + +//Action included a query string parameter of userName +//or a form field with name of userName +if (userName != null) { +messageStore.setMessage( messageStore.getMessage() + " " + userName); +} + +helloCount++; + +return SUCCESS; +} - public MessageStore getMessageStore() { - return messageStore; - } +public MessageStore getMessageStore() { +return messageStore; +} - public void setMessageStore(MessageStore messageStore) { -
[5/8] struts-examples git commit: unified indentation
unified indentation Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/b3715b9d Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/b3715b9d Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/b3715b9d Branch: refs/heads/master Commit: b3715b9dda5511311bf928b916397ac87b624c37 Parents: 8e09299 Author: Stefaan DutryAuthored: Sun Apr 23 18:07:06 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 18:07:06 2017 +0200 -- coding-actions/src/main/resources/struts.xml | 34 ++- 1 file changed, 15 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/b3715b9d/coding-actions/src/main/resources/struts.xml -- diff --git a/coding-actions/src/main/resources/struts.xml b/coding-actions/src/main/resources/struts.xml index fb4c41f..567e274 100644 --- a/coding-actions/src/main/resources/struts.xml +++ b/coding-actions/src/main/resources/struts.xml @@ -1,26 +1,22 @@ http://struts.apache.org/dtds/struts-2.5.dtd;> +"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" +"http://struts.apache.org/dtds/struts-2.5.dtd;> + - - - - + - - /index.jsp - - - - - /HelloWorld.jsp - - - - - \ No newline at end of file + +/index.jsp + + + + +/HelloWorld.jsp + + +
[4/8] struts-examples git commit: removed unnecessary setter
removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/8e09299f Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/8e09299f Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/8e09299f Branch: refs/heads/master Commit: 8e09299f253e946eac0c86aec2139b754cc2a9cc Parents: 60035c0 Author: Stefaan DutryAuthored: Sun Apr 23 18:01:30 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 18:01:30 2017 +0200 -- .../org/apache/struts/helloworld/action/HelloWorldAction.java| 4 1 file changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/8e09299f/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index c847cec..ffcf6e2 100644 --- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -63,8 +63,4 @@ public class HelloWorldAction extends ActionSupport { return messageStore; } -public void setMessageStore(MessageStore messageStore) { -this.messageStore = messageStore; -} - }
[3/8] struts-examples git commit: fixed comment
fixed comment Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/60035c0a Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/60035c0a Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/60035c0a Branch: refs/heads/master Commit: 60035c0a3089d0c243329120e10a47abddd90d87 Parents: c98d0fc Author: Stefaan DutryAuthored: Sun Apr 23 17:59:32 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 17:59:32 2017 +0200 -- .../java/org/apache/struts/helloworld/action/HelloWorldAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/60035c0a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 71eea4b..c847cec 100644 --- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -6,7 +6,7 @@ import org.apache.struts.helloworld.model.MessageStore; /** * Acts as a Struts 2 controller that responds * to a user action by setting the value - * of the Message model class, and returns a String + * of the MessageStore model class, and returns a String * result. * @author Bruce Phillips *
[7/8] struts-examples git commit: removed sessionid from url
removed sessionid from url Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/df82ce5a Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/df82ce5a Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/df82ce5a Branch: refs/heads/master Commit: df82ce5ae11af3641f5d05e0193fc50cdc9453f7 Parents: 65ebbae Author: Stefaan DutryAuthored: Sun Apr 23 23:07:24 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 23:07:24 2017 +0200 -- coding-actions/src/main/webapp/WEB-INF/web.xml | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/df82ce5a/coding-actions/src/main/webapp/WEB-INF/web.xml -- diff --git a/coding-actions/src/main/webapp/WEB-INF/web.xml b/coding-actions/src/main/webapp/WEB-INF/web.xml index 4241d94..c698d2b 100644 --- a/coding-actions/src/main/webapp/WEB-INF/web.xml +++ b/coding-actions/src/main/webapp/WEB-INF/web.xml @@ -1,10 +1,9 @@ http://java.sun.com/xml/ns/j2ee; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;> Coding Actions - -index.jsp - - + +index.jsp + struts2 @@ -15,5 +14,8 @@ struts2 /* - + + +COOKIE +
[8/8] struts-examples git commit: changed deprecated artifactId to project.artifactId
changed deprecated artifactId to project.artifactId Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/15c545e0 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/15c545e0 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/15c545e0 Branch: refs/heads/master Commit: 15c545e0d197c7650888f3117ab853bfed7bd4fe Parents: df82ce5 Author: Stefaan DutryAuthored: Sun Apr 23 23:47:53 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 23:47:53 2017 +0200 -- coding-actions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/15c545e0/coding-actions/pom.xml -- diff --git a/coding-actions/pom.xml b/coding-actions/pom.xml index 098ce98..c7e027f 100644 --- a/coding-actions/pom.xml +++ b/coding-actions/pom.xml @@ -25,7 +25,7 @@ 8.1.16.v20140903 -/${artifactId} +/${project.artifactId} CTRL+C 8999
[6/8] struts-examples git commit: added indentation to jsp files
added indentation to jsp files Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/65ebbae1 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/65ebbae1 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/65ebbae1 Branch: refs/heads/master Commit: 65ebbae1e592d3454244dca2df62460a1f266640 Parents: b3715b9 Author: Stefaan DutryAuthored: Sun Apr 23 18:12:25 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 18:12:25 2017 +0200 -- coding-actions/src/main/webapp/HelloWorld.jsp | 20 +--- coding-actions/src/main/webapp/index.jsp | 38 ++ 2 files changed, 25 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/65ebbae1/coding-actions/src/main/webapp/HelloWorld.jsp -- diff --git a/coding-actions/src/main/webapp/HelloWorld.jsp b/coding-actions/src/main/webapp/HelloWorld.jsp index 4e19ac9..b15b53c 100644 --- a/coding-actions/src/main/webapp/HelloWorld.jsp +++ b/coding-actions/src/main/webapp/HelloWorld.jsp @@ -2,19 +2,15 @@ <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> - + Hello World! - - - - - -I've said hello times! - - - -Home Page - + + + +I've said hello times! + +Home Page + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/65ebbae1/coding-actions/src/main/webapp/index.jsp -- diff --git a/coding-actions/src/main/webapp/index.jsp b/coding-actions/src/main/webapp/index.jsp index f96ec7f..bc167d4 100644 --- a/coding-actions/src/main/webapp/index.jsp +++ b/coding-actions/src/main/webapp/index.jsp @@ -2,29 +2,25 @@ <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> - + Basic Struts 2 Application - Welcome - + - -Welcome To Struts 2! - - -Hello World - - -Bruce Phillips - -Hello Bruce Phillips - -Get your own personal hello by filling out and submitting this form. - - - - - - - + +Welcome To Struts 2! + + Hello World + + + Bruce Phillips + +Hello Bruce Phillips +Get your own personal hello by filling out and submitting this form. + + + + +
struts-examples git commit: updated log4j2 to version 2.8.2 (WW-4780)
Repository: struts-examples Updated Branches: refs/heads/master 6711d4381 -> 51a2f1874 updated log4j2 to version 2.8.2 (WW-4780) Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/51a2f187 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/51a2f187 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/51a2f187 Branch: refs/heads/master Commit: 51a2f18740c496424c5456bec417958d86fefe7f Parents: 6711d43 Author: Stefaan DutryAuthored: Sun Apr 23 15:38:32 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 15:38:32 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/51a2f187/pom.xml -- diff --git a/pom.xml b/pom.xml index 1e40f3d..16778d5 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ UTF-8 2.5.11-SNAPSHOT -2.8 +2.8.2
[1/2] struts-examples git commit: removed unnecessary setter
Repository: struts-examples Updated Branches: refs/heads/master dae06d15a -> 6711d4381 removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/784b3398 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/784b3398 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/784b3398 Branch: refs/heads/master Commit: 784b33986629d67ed094d23fd8c70141bb792bc0 Parents: dae06d1 Author: Stefaan DutryAuthored: Sun Apr 23 15:23:21 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 15:23:21 2017 +0200 -- .../struts/using_tags/helloworld/action/HelloWorldAction.java| 4 1 file changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/784b3398/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java -- diff --git a/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java b/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java index 835dc56..6111deb 100644 --- a/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java +++ b/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java @@ -28,10 +28,6 @@ public class HelloWorldAction extends ActionSupport { return helloCount; } -public void setHelloCount(int helloCount) { -HelloWorldAction.helloCount = helloCount; -} - /* * Creates the MessageStore model object, * increase helloCount by 1 and
struts-site git commit: added new attachments
Repository: struts-site Updated Branches: refs/heads/master 565b2489a -> 5b8747929 added new attachments Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/5b874792 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/5b874792 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/5b874792 Branch: refs/heads/master Commit: 5b8747929bff2b3f57d0b20b038faf64d4e4ba87 Parents: 565b248 Author: Stefaan DutryAuthored: Sun Apr 23 15:12:18 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 15:12:18 2017 +0200 -- .../attachments/using_tags_form.png| Bin 0 -> 15576 bytes .../attachments/using_tags_hello.png | Bin 0 -> 9965 bytes 2 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/5b874792/source/getting-started/attachments/using_tags_form.png -- diff --git a/source/getting-started/attachments/using_tags_form.png b/source/getting-started/attachments/using_tags_form.png new file mode 100644 index 000..5f2efd4 Binary files /dev/null and b/source/getting-started/attachments/using_tags_form.png differ http://git-wip-us.apache.org/repos/asf/struts-site/blob/5b874792/source/getting-started/attachments/using_tags_hello.png -- diff --git a/source/getting-started/attachments/using_tags_hello.png b/source/getting-started/attachments/using_tags_hello.png new file mode 100644 index 000..6a44a3f Binary files /dev/null and b/source/getting-started/attachments/using_tags_hello.png differ
struts-site git commit: updated using-tags page
Repository: struts-site Updated Branches: refs/heads/master b93572c86 -> 9c807f143 updated using-tags 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/9c807f14 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/9c807f14 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/9c807f14 Branch: refs/heads/master Commit: 9c807f143cbcdf64a99a067759a59e028b4ec13f Parents: b93572c Author: Stefaan DutryAuthored: Sun Apr 23 14:50:37 2017 +0200 Committer: Stefaan Dutry Committed: Sun Apr 23 14:50:37 2017 +0200 -- source/getting-started/using-tags.md | 95 ++- 1 file changed, 43 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/9c807f14/source/getting-started/using-tags.md -- diff --git a/source/getting-started/using-tags.md b/source/getting-started/using-tags.md index 1723017..19c6710 100644 --- a/source/getting-started/using-tags.md +++ b/source/getting-started/using-tags.md @@ -6,30 +6,30 @@ title: Using tags This tutorial assumes you've completed the [Hello World](hello-world-using-struts2.html) tutorial and have a working helloworld project. The example code for this tutorial, using_tags, is available for checkout from the Struts 2 GitHub repository at [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). The example projects use Maven to manage the artifact dependencies and to build the .war files. -In the [Hello World](hello-world-using-struts2.html) lesson, we added to the index.jsp a Struts 2 url tag to create a hyperlink to the hello.action. This tutorial will explore the url and other Struts 2 tags further. +In the [Hello World](hello-world-using-struts2.html) lesson, we added a Struts 2 url tag to the `index.jsp` to create a hyperlink to the `hello.action`. This tutorial will explore the url and other Struts 2 tags further. Web applications differ from conventional websites in that web applications can create a dynamic response. To make it easier to reference dynamic data from a page, the Struts 2 framework offers a set of tags. Some of the tags mimic standard HTML tag while providing added value. Other tags create non-standard, but useful controls. To use the Struts 2 tags on the view page, you must include a tag library directive. Typically, the taglib directive is `<%@ taglib prefix="s" uri="/struts-tags" %\>`. So the prefix for all the Struts 2 tags will be "s". -If you want to actually read the Struts 2 tag TLD file, you'll find it in the META-INF folder of the Struts 2 core jar. +If you want to actually read the Struts 2 tag TLD file, you'll find it in the `META-INF folder of the Struts 2 core jar. -__Struts 2 url Tag__ +### Struts 2 url Tag One use of the Struts 2 Tags is to create links to other web resources, especially to other resources in the local application. While HTML provides a simple a tag for creating hyperlinks, the HTML tag often requires us to include redundant information. Also the HTML tag cannot easily access dynamic data provided by the framework. -A very common use case in web applications is linking to other pages. In the [Hello World](hello-world-using-struts2.html) tutorial we added to index.jsp a link to the hello.action using the Struts 2 url tag. Please refer to the _url documentation_ for more information about the url tag. +A very common use case in web applications is linking to other pages. In the [Hello World](hello-world-using-struts2.html) tutorial we added a link to `hello.action` inside the `index.jsp` using the Struts 2 url tag. Please refer to the [url documentation](https://struts.apache.org/docs/url.html) for more information about the url tag. **index.jsp** ```html -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> - + Basic Struts 2 Application - Welcome @@ -39,94 +39,89 @@ A very common use case in web applications is linking to other pages. In the [He ``` -When you run the Hello World tutorial in your Servlet container and then mouse over the Hello World hyperlink created by the Struts 2 url tag you'll see that the URL created is hello.action (relative to the web context's root folder). +When you run the Hello World tutorial in your Servlet container and then mouse over the Hello World hyperlink created by the Struts 2 url tag you'll see that the URL created is `hello.action`
[2/2] struts git commit: WW-4780 fixed logging in the struts2-portlet-plugin tests
WW-4780 fixed logging in the struts2-portlet-plugin tests Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/b465791d Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/b465791d Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/b465791d Branch: refs/heads/master Commit: b465791dc2097b24991da4b61245278a7b48c88c Parents: defaf43 Author: Stefaan DutryAuthored: Sat Apr 22 00:05:41 2017 +0200 Committer: Stefaan Dutry Committed: Sat Apr 22 00:05:41 2017 +0200 -- plugins/portlet/pom.xml | 5 +++-- plugins/portlet/src/test/resources/log4j2.xml | 13 + 2 files changed, 16 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/b465791d/plugins/portlet/pom.xml -- diff --git a/plugins/portlet/pom.xml b/plugins/portlet/pom.xml index 33957d7..7a04cda 100644 --- a/plugins/portlet/pom.xml +++ b/plugins/portlet/pom.xml @@ -94,8 +94,9 @@ -log4j -log4j +org.apache.logging.log4j +log4j-core +${log4j2.version} test http://git-wip-us.apache.org/repos/asf/struts/blob/b465791d/plugins/portlet/src/test/resources/log4j2.xml -- diff --git a/plugins/portlet/src/test/resources/log4j2.xml b/plugins/portlet/src/test/resources/log4j2.xml new file mode 100644 index 000..395e01b --- /dev/null +++ b/plugins/portlet/src/test/resources/log4j2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + +
[1/2] struts git commit: WW-4780 fixed logging in the struts2-cdi-plugin tests
Repository: struts Updated Branches: refs/heads/master 11cccb68a -> b465791dc WW-4780 fixed logging in the struts2-cdi-plugin tests Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/defaf43a Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/defaf43a Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/defaf43a Branch: refs/heads/master Commit: defaf43a4c27ca62b9ec8db5749ef4a6f80fc719 Parents: 11cccb6 Author: Stefaan DutryAuthored: Fri Apr 21 23:49:43 2017 +0200 Committer: Stefaan Dutry Committed: Fri Apr 21 23:49:43 2017 +0200 -- plugins/cdi/pom.xml | 5 +++-- plugins/cdi/src/test/resources/log4j.properties | 11 --- plugins/cdi/src/test/resources/log4j2.xml | 14 ++ 3 files changed, 17 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/defaf43a/plugins/cdi/pom.xml -- diff --git a/plugins/cdi/pom.xml b/plugins/cdi/pom.xml index fee24ca..90239f3 100644 --- a/plugins/cdi/pom.xml +++ b/plugins/cdi/pom.xml @@ -59,8 +59,9 @@ -log4j -log4j +org.apache.logging.log4j +log4j-core +${log4j2.version} test http://git-wip-us.apache.org/repos/asf/struts/blob/defaf43a/plugins/cdi/src/test/resources/log4j.properties -- diff --git a/plugins/cdi/src/test/resources/log4j.properties b/plugins/cdi/src/test/resources/log4j.properties deleted file mode 100644 index 77d9939..000 --- a/plugins/cdi/src/test/resources/log4j.properties +++ /dev/null @@ -1,11 +0,0 @@ -# Set root logger level to WARN and append to stdout -log4j.rootLogger=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -# Pattern to output the caller's file name and line number. -log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n - -# Print only messages of level ERROR or above in the package noModule. -log4j.logger.noModule=FATAL http://git-wip-us.apache.org/repos/asf/struts/blob/defaf43a/plugins/cdi/src/test/resources/log4j2.xml -- diff --git a/plugins/cdi/src/test/resources/log4j2.xml b/plugins/cdi/src/test/resources/log4j2.xml new file mode 100644 index 000..3edabe1 --- /dev/null +++ b/plugins/cdi/src/test/resources/log4j2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +
[8/9] struts-examples git commit: changed doctype to html5
changed doctype to html5 Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/72c31f2b Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/72c31f2b Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/72c31f2b Branch: refs/heads/master Commit: 72c31f2b1fa72213d2ee827338c7eca2e5039f69 Parents: 404319b Author: Stefaan DutryAuthored: Wed Apr 19 23:29:14 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 23:29:14 2017 +0200 -- using-tags/src/main/webapp/HelloWorld.jsp | 2 +- using-tags/src/main/webapp/index.jsp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/72c31f2b/using-tags/src/main/webapp/HelloWorld.jsp -- diff --git a/using-tags/src/main/webapp/HelloWorld.jsp b/using-tags/src/main/webapp/HelloWorld.jsp index f05ae12..e6006f3 100644 --- a/using-tags/src/main/webapp/HelloWorld.jsp +++ b/using-tags/src/main/webapp/HelloWorld.jsp @@ -1,6 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/72c31f2b/using-tags/src/main/webapp/index.jsp -- diff --git a/using-tags/src/main/webapp/index.jsp b/using-tags/src/main/webapp/index.jsp index 9967f3c..6c6fa80 100644 --- a/using-tags/src/main/webapp/index.jsp +++ b/using-tags/src/main/webapp/index.jsp @@ -1,6 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> +
[6/9] struts-examples git commit: removed unnecessary setter
removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/f4fb7dfb Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/f4fb7dfb Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/f4fb7dfb Branch: refs/heads/master Commit: f4fb7dfb95496d152f8f23f8029a7ba85e07cc1e Parents: 1010c52 Author: Stefaan DutryAuthored: Wed Apr 19 22:59:24 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 22:59:24 2017 +0200 -- .../struts/using_tags/helloworld/model/MessageStore.java | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/f4fb7dfb/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/model/MessageStore.java -- diff --git a/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/model/MessageStore.java b/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/model/MessageStore.java index b14f766..6871281 100644 --- a/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/model/MessageStore.java +++ b/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/model/MessageStore.java @@ -10,17 +10,13 @@ public class MessageStore { private String message; public MessageStore() { -setMessage("Hello Struts User"); +message = "Hello Struts User"; } public String getMessage() { return message; } -public void setMessage(String message) { -this.message = message; -} - public String toString() { return message + " (from toString)"; }
[9/9] struts-examples git commit: changed deprecated artifactId to project.artifactId
changed deprecated artifactId to project.artifactId Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/18affab8 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/18affab8 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/18affab8 Branch: refs/heads/master Commit: 18affab89c9bfad8c7c0cecdbb313142cc4394cb Parents: 72c31f2 Author: Stefaan DutryAuthored: Wed Apr 19 23:51:31 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 23:51:31 2017 +0200 -- using-tags/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/18affab8/using-tags/pom.xml -- diff --git a/using-tags/pom.xml b/using-tags/pom.xml index b649c44..0414941 100644 --- a/using-tags/pom.xml +++ b/using-tags/pom.xml @@ -25,7 +25,7 @@ 8.1.16.v20140903 -/${artifactId} +/${project.artifactId} CTRL+C 8999
[2/9] struts-examples git commit: tried adding some form of indentation to jsps
tried adding some form of indentation to jsps Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/bfea188e Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/bfea188e Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/bfea188e Branch: refs/heads/master Commit: bfea188e35d816b90994786f475c6164506a7f40 Parents: 141802c Author: Stefaan DutryAuthored: Wed Apr 19 22:36:38 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 22:36:38 2017 +0200 -- using-tags/src/main/webapp/HelloWorld.jsp | 23 +++--- using-tags/src/main/webapp/index.jsp | 44 +++--- 2 files changed, 30 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/bfea188e/using-tags/src/main/webapp/HelloWorld.jsp -- diff --git a/using-tags/src/main/webapp/HelloWorld.jsp b/using-tags/src/main/webapp/HelloWorld.jsp index 108810c..7f39cf6 100644 --- a/using-tags/src/main/webapp/HelloWorld.jsp +++ b/using-tags/src/main/webapp/HelloWorld.jsp @@ -1,15 +1,14 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - - -Hello World! - - - -I've said hello times! - - - \ No newline at end of file + + +Hello World! + + + +I've said hello times! + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/bfea188e/using-tags/src/main/webapp/index.jsp -- diff --git a/using-tags/src/main/webapp/index.jsp b/using-tags/src/main/webapp/index.jsp index f9bcea2..114b534 100644 --- a/using-tags/src/main/webapp/index.jsp +++ b/using-tags/src/main/webapp/index.jsp @@ -1,28 +1,22 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - - -Basic Struts 2 Application - Welcome - - -Welcome To Struts 2! -Hello World - - Bruce Phillips - -Hello Bruce Phillips - -Get your own personal hello by filling out and submitting this form. - - - - - - - - - - \ No newline at end of file + + +Basic Struts 2 Application - Welcome + + +Welcome To Struts 2! +Hello World + + Bruce Phillips + +Hello Bruce Phillips +Get your own personal hello by filling out and submitting this form. + + + + + +
[3/9] struts-examples git commit: changed formatting for struts.xml
changed formatting for struts.xml Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/03e6bd81 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/03e6bd81 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/03e6bd81 Branch: refs/heads/master Commit: 03e6bd8164e8482b476a718204ff026a9147307b Parents: bfea188 Author: Stefaan DutryAuthored: Wed Apr 19 22:41:09 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 22:41:09 2017 +0200 -- using-tags/src/main/resources/struts.xml | 33 --- 1 file changed, 14 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/03e6bd81/using-tags/src/main/resources/struts.xml -- diff --git a/using-tags/src/main/resources/struts.xml b/using-tags/src/main/resources/struts.xml index be7c92c..8711da3 100644 --- a/using-tags/src/main/resources/struts.xml +++ b/using-tags/src/main/resources/struts.xml @@ -1,27 +1,22 @@ http://struts.apache.org/dtds/struts-2.5.dtd;> - +"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" +"http://struts.apache.org/dtds/struts-2.5.dtd;> + - - - - + - - /index.jsp - - - - - /HelloWorld.jsp - - - + +/index.jsp + - \ No newline at end of file + + +/HelloWorld.jsp + + +
[5/9] struts-examples git commit: removed unnecessary setter
removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/1010c524 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/1010c524 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/1010c524 Branch: refs/heads/master Commit: 1010c52435587c9470880db15267062c98362eb1 Parents: 7e2b1ca Author: Stefaan DutryAuthored: Wed Apr 19 22:55:29 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 22:55:29 2017 +0200 -- .../struts/using_tags/helloworld/action/HelloWorldAction.java| 4 1 file changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1010c524/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java -- diff --git a/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java b/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java index c4d320f..835dc56 100644 --- a/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java +++ b/using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java @@ -52,8 +52,4 @@ public class HelloWorldAction extends ActionSupport { return messageStore; } -public void setMessageStore(MessageStore messageStore) { -this.messageStore = messageStore; -} - }
[7/9] struts-examples git commit: changed encoding to UTF-8
changed encoding to UTF-8 Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/404319bf Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/404319bf Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/404319bf Branch: refs/heads/master Commit: 404319bf2ba114eea3a7aacc1d98252f73f2da17 Parents: f4fb7df Author: Stefaan DutryAuthored: Wed Apr 19 23:22:31 2017 +0200 Committer: Stefaan Dutry Committed: Wed Apr 19 23:22:31 2017 +0200 -- using-tags/src/main/webapp/HelloWorld.jsp | 4 ++-- using-tags/src/main/webapp/index.jsp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/404319bf/using-tags/src/main/webapp/HelloWorld.jsp -- diff --git a/using-tags/src/main/webapp/HelloWorld.jsp b/using-tags/src/main/webapp/HelloWorld.jsp index 7f39cf6..f05ae12 100644 --- a/using-tags/src/main/webapp/HelloWorld.jsp +++ b/using-tags/src/main/webapp/HelloWorld.jsp @@ -1,9 +1,9 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - + Hello World! http://git-wip-us.apache.org/repos/asf/struts-examples/blob/404319bf/using-tags/src/main/webapp/index.jsp -- diff --git a/using-tags/src/main/webapp/index.jsp b/using-tags/src/main/webapp/index.jsp index 114b534..9967f3c 100644 --- a/using-tags/src/main/webapp/index.jsp +++ b/using-tags/src/main/webapp/index.jsp @@ -1,9 +1,9 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/html4/loose.dtd;> - + Basic Struts 2 Application - Welcome
[3/6] struts-examples git commit: removed unnecessary throws statement
removed unnecessary throws statement Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/3e31be74 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/3e31be74 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/3e31be74 Branch: refs/heads/master Commit: 3e31be74a4f7d694fbe5628c0a4a32262a55945d Parents: 47ad79f Author: Stefaan DutryAuthored: Mon Apr 17 15:27:20 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 15:27:20 2017 +0200 -- .../java/org/apache/struts/helloworld/action/HelloWorldAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/3e31be74/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 8d55e22..d098c07 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -29,7 +29,7 @@ public class HelloWorldAction extends ActionSupport { * (non-Javadoc) * @see com.opensymphony.xwork2.ActionSupport#execute() */ -public String execute() throws Exception { +public String execute() { messageStore = new MessageStore() ; return SUCCESS;
[6/6] struts-examples git commit: updated jsps: UTF-8, html5, indentation
updated jsps: UTF-8, html5, indentation Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/6d98cba6 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/6d98cba6 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/6d98cba6 Branch: refs/heads/master Commit: 6d98cba65f4065d84c2f0b889c77d76f81ef0c47 Parents: 8d53015 Author: Stefaan DutryAuthored: Mon Apr 17 16:35:37 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 16:35:37 2017 +0200 -- helloworld/src/main/webapp/HelloWorld.jsp | 21 ++--- helloworld/src/main/webapp/index.jsp | 23 +++ 2 files changed, 21 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/6d98cba6/helloworld/src/main/webapp/HelloWorld.jsp -- diff --git a/helloworld/src/main/webapp/HelloWorld.jsp b/helloworld/src/main/webapp/HelloWorld.jsp index f795612..db8e040 100755 --- a/helloworld/src/main/webapp/HelloWorld.jsp +++ b/helloworld/src/main/webapp/HelloWorld.jsp @@ -1,13 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> - - -Hello World! - - - - - \ No newline at end of file + + +Hello World! + + + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/6d98cba6/helloworld/src/main/webapp/index.jsp -- diff --git a/helloworld/src/main/webapp/index.jsp b/helloworld/src/main/webapp/index.jsp index 6dc1e78..de471ed 100755 --- a/helloworld/src/main/webapp/index.jsp +++ b/helloworld/src/main/webapp/index.jsp @@ -1,14 +1,13 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" -pageEncoding="ISO-8859-1"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> -http://www.w3.org/TR/html4/loose.dtd;> - - -Basic Struts 2 Application - Welcome - - -Welcome To Struts 2! -Hello World - - \ No newline at end of file + + +Basic Struts 2 Application - Welcome + + +Welcome To Struts 2! +Hello World + +
[4/6] struts-examples git commit: changed deprecated ${artifactId} to ${project.artifactId}
changed deprecated ${artifactId} to ${project.artifactId} Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/a7c5f304 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/a7c5f304 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/a7c5f304 Branch: refs/heads/master Commit: a7c5f3049e97695cbbbfdbb3564d7a033e40e7cd Parents: 3e31be7 Author: Stefaan DutryAuthored: Mon Apr 17 15:32:20 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 15:32:20 2017 +0200 -- helloworld/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/a7c5f304/helloworld/pom.xml -- diff --git a/helloworld/pom.xml b/helloworld/pom.xml index b304d55..a7fb8da 100644 --- a/helloworld/pom.xml +++ b/helloworld/pom.xml @@ -25,7 +25,7 @@ 8.1.16.v20140903 -/${artifactId} +/${project.artifactId} CTRL+C 8999
[2/6] struts-examples git commit: removed unnecessary setter
removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/47ad79f1 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/47ad79f1 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/47ad79f1 Branch: refs/heads/master Commit: 47ad79f1736e26075fd06de551ef3c369ef20977 Parents: 06c4ded Author: Stefaan DutryAuthored: Mon Apr 17 15:25:24 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 15:25:24 2017 +0200 -- .../org/apache/struts/helloworld/action/HelloWorldAction.java | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/47ad79f1/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 8073413..8d55e22 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -30,8 +30,8 @@ public class HelloWorldAction extends ActionSupport { * @see com.opensymphony.xwork2.ActionSupport#execute() */ public String execute() throws Exception { - messageStore = new MessageStore() ; + return SUCCESS; } @@ -39,8 +39,4 @@ public class HelloWorldAction extends ActionSupport { return messageStore; } -public void setMessageStore(MessageStore messageStore) { -this.messageStore = messageStore; -} - }
[5/6] struts-examples git commit: removed unnecessary setter
removed unnecessary setter Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/8d530157 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/8d530157 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/8d530157 Branch: refs/heads/master Commit: 8d530157fed0df9442fb897478195889428de0f3 Parents: a7c5f30 Author: Stefaan DutryAuthored: Mon Apr 17 15:40:37 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 15:40:37 2017 +0200 -- .../java/org/apache/struts/helloworld/model/MessageStore.java | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/8d530157/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java -- diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java b/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java index cb70e51..e52fa89 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java @@ -10,15 +10,11 @@ public class MessageStore { private String message; public MessageStore() { -setMessage("Hello Struts User"); +message = "Hello Struts User"; } public String getMessage() { return message; } -public void setMessage(String message) { -this.message = message; -} - }
[1/6] struts-examples git commit: changed tabs to spaces
Repository: struts-examples Updated Branches: refs/heads/master 5b55e1aa8 -> 6d98cba65 changed tabs to spaces Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/06c4deda Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/06c4deda Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/06c4deda Branch: refs/heads/master Commit: 06c4deda76ae90512db8b2f246d89e3a417b86cc Parents: 5b55e1a Author: Stefaan DutryAuthored: Mon Apr 17 15:22:24 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 15:22:24 2017 +0200 -- .../helloworld/action/HelloWorldAction.java | 58 ++-- .../struts/helloworld/model/MessageStore.java | 25 - 2 files changed, 40 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/06c4deda/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java -- diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index b96dbda..8073413 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -14,35 +14,33 @@ import com.opensymphony.xwork2.ActionSupport; */ public class HelloWorldAction extends ActionSupport { - private static final long serialVersionUID = 1L; - - /** -* The model class that stores the message -* to display in the view. -*/ - private MessageStore messageStore; - - /* -* Creates the MessageStore model object and -* returns success. The MessageStore model -* object will be available to the view. -* (non-Javadoc) -* @see com.opensymphony.xwork2.ActionSupport#execute() -*/ - public String execute() throws Exception { - - messageStore = new MessageStore() ; - return SUCCESS; - } - - public MessageStore getMessageStore() { - return messageStore; - } - - public void setMessageStore(MessageStore messageStore) { - this.messageStore = messageStore; - } - - +private static final long serialVersionUID = 1L; + +/** + * The model class that stores the message + * to display in the view. + */ +private MessageStore messageStore; + +/* + * Creates the MessageStore model object and + * returns success. The MessageStore model + * object will be available to the view. + * (non-Javadoc) + * @see com.opensymphony.xwork2.ActionSupport#execute() + */ +public String execute() throws Exception { + +messageStore = new MessageStore() ; +return SUCCESS; +} + +public MessageStore getMessageStore() { +return messageStore; +} + +public void setMessageStore(MessageStore messageStore) { +this.messageStore = messageStore; +} } http://git-wip-us.apache.org/repos/asf/struts-examples/blob/06c4deda/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java -- diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java b/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java index 03d87d3..cb70e51 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java @@ -6,20 +6,19 @@ package org.apache.struts.helloworld.model; * */ public class MessageStore { - - private String message; - - public MessageStore() { - - setMessage("Hello Struts User"); - } + +private String message; + +public MessageStore() { +setMessage("Hello Struts User"); +} - public String getMessage() { - return message; - } +public String getMessage() { +return message; +} - public void setMessage(String message) { - this.message = message; - } +public void setMessage(String message) { +this.message = message; +} }
[2/2] struts-examples git commit: fixed link
fixed link Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/5b55e1aa Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/5b55e1aa Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/5b55e1aa Branch: refs/heads/master Commit: 5b55e1aa8a78ea3683648b565d9dd99fe9126bd5 Parents: 213b0a5 Author: Stefaan DutryAuthored: Mon Apr 17 10:19:46 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 10:23:15 2017 +0200 -- basic-struts/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/5b55e1aa/basic-struts/README.md -- diff --git a/basic-struts/README.md b/basic-struts/README.md index 529ccb4..457578c 100644 --- a/basic-struts/README.md +++ b/basic-struts/README.md @@ -10,12 +10,12 @@ The war file is created in the `target` sub-folder. ### Using Maven run the command `mvn jetty:run` -### Using a servlet container +### Using a Servlet container Copy the war file to your Servlet container (e.g. Tomcat) and then startup the Servlet container. ## Accessing the application -In a web browser go to: [http://localhost:8080/basic-struts/index.action]([http://localhost:8080/basic-struts/index.action) +In a web browser go to: [http://localhost:8080/basic-struts/index.action](http://localhost:8080/basic-struts/index.action) You should see a web page with
[1/2] struts-examples git commit: Added README.md file
Repository: struts-examples Updated Branches: refs/heads/master c785bc559 -> 5b55e1aa8 Added README.md file Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/213b0a59 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/213b0a59 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/213b0a59 Branch: refs/heads/master Commit: 213b0a59dd0bc4f9240dc286a475ebe8d10db1eb Parents: c785bc5 Author: Stefaan DutryAuthored: Mon Apr 17 10:15:14 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 10:22:58 2017 +0200 -- basic-struts/README.md | 24 1 file changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/213b0a59/basic-struts/README.md -- diff --git a/basic-struts/README.md b/basic-struts/README.md new file mode 100644 index 000..529ccb4 --- /dev/null +++ b/basic-struts/README.md @@ -0,0 +1,24 @@ +This is the example project referred to in the Struts 2 documentation, [How To Create A Struts 2 Web Application](http://struts.apache.org/getting-started/how-to-create-a-struts2-web-application.html) tutorial. + +## Building the war +### Using Maven +To build the application's war file run `mvn clean package` from the project's root folder. + +The war file is created in the `target` sub-folder. + +## Running the application +### Using Maven +run the command `mvn jetty:run` + +### Using a servlet container +Copy the war file to your Servlet container (e.g. Tomcat) and then startup the Servlet container. + +## Accessing the application + +In a web browser go to: [http://localhost:8080/basic-struts/index.action]([http://localhost:8080/basic-struts/index.action) + +You should see a web page with + +``` +Welcome to Struts 2! +```
[1/2] struts-examples git commit: changed deprecated ${artifactId} to ${project.artifactId}
Repository: struts-examples Updated Branches: refs/heads/master 4b3878d73 -> c785bc559 changed deprecated ${artifactId} to ${project.artifactId} Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/08834c5d Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/08834c5d Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/08834c5d Branch: refs/heads/master Commit: 08834c5dae4be91c87684641809ae52ae2f933e7 Parents: 4b3878d Author: Stefaan DutryAuthored: Mon Apr 17 09:06:10 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 09:06:10 2017 +0200 -- basic-struts/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/08834c5d/basic-struts/pom.xml -- diff --git a/basic-struts/pom.xml b/basic-struts/pom.xml index 8743cf3..80665aa 100644 --- a/basic-struts/pom.xml +++ b/basic-struts/pom.xml @@ -23,7 +23,7 @@ 8.1.16.v20140903 -/${artifactId} +/${project.artifactId} CTRL+C 8999
[2/2] struts-examples git commit: added missing log4j2 dependency
added missing log4j2 dependency Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/c785bc55 Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/c785bc55 Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/c785bc55 Branch: refs/heads/master Commit: c785bc559904c72830333d23cf6eb478a857176c Parents: 08834c5 Author: Stefaan DutryAuthored: Mon Apr 17 09:24:48 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 17 09:24:48 2017 +0200 -- pom.xml | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c785bc55/pom.xml -- diff --git a/pom.xml b/pom.xml index 43b8926..16778d5 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,7 @@ UTF-8 2.5.11-SNAPSHOT +2.8.2 @@ -91,8 +92,24 @@ ${struts2.version} + +org.apache.logging.log4j +log4j-core +${log4j2.version} + + + + + +org.apache.logging.log4j +log4j-api +${log4j2.version} + + + + @@ -141,4 +158,4 @@ - \ No newline at end of file +
struts-site git commit: fixed missing link and fixed title headings
Repository: struts-site Updated Branches: refs/heads/master 44c0a2a44 -> 2423050b6 fixed missing link and fixed title headings Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/2423050b Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/2423050b Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/2423050b Branch: refs/heads/master Commit: 2423050b61bf4658245c846954e5397c86525ba5 Parents: 44c0a2a Author: Stefaan DutryAuthored: Mon Apr 3 21:25:14 2017 +0200 Committer: Stefaan Dutry Committed: Mon Apr 3 21:31:19 2017 +0200 -- .../hello-world-using-struts2.md| 36 1 file changed, 14 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-site/blob/2423050b/source/getting-started/hello-world-using-struts2.md -- diff --git a/source/getting-started/hello-world-using-struts2.md b/source/getting-started/hello-world-using-struts2.md index 359d59e..dd62365 100644 --- a/source/getting-started/hello-world-using-struts2.md +++ b/source/getting-started/hello-world-using-struts2.md @@ -14,24 +14,21 @@ Suppose you want to create a simple "Hello World" example that displays a welcom 3. Create an Action class to control the interaction between the user, the model, and the view (the controller) -4. Create a mapping (struts.xml) to couple the Action class and view +4. Create a mapping (`struts.xml`) to couple the Action class and view By creating these components, we are separating the work flow into three well-known concerns: the View, the Model, and the Controller. Separating concerns makes it easier to manage applications as they become more complex. -| - Let's look at an example model class, Action, server page, and mapping. If you like, fire up your Java IDE, and enter the code as we go. - > This tutorial assumes you've completed the [How To Create A Struts 2 Web > Application](#PAGE_14811860) tutorial and have a working basic Struts > project. The example code for this tutorial, helloworld, is available for > checkout from the Struts 2 GitHub repository at > [https://github.com/apache/struts-examples](https://github.com/apache/struts-examples). > The example projects use Maven to manage the artifact dependencies and to > build the .war files. -__The Code__ +### The Code Let's modify either the basic_struts project to add a model class to store our message, a view that displays our message, an Action class to act as the controller, and a configuration that ties everything together. -| The [Struts 2 user mailing list](http://struts.apache.org/mail.html) is an excellent place to get help. If you are having a problem getting this application to work search the Struts 2 mailing list. If you don't find an answer to your problem, post a question on the mailing list. +> The [Struts 2 user mailing list](http://struts.apache.org/mail.html) is an excellent place to get help. If you are having a problem getting this application to work search the Struts 2 mailing list. If you don't find an answer to your problem, post a question on the mailing list. -__Step 1 - Create The Model Class MessageStore.java__ + Step 1 - Create The Model Class MessageStore.java If you're using the Basic_Struts2_Ant project to start with create the MessageStore class in the src folder and if you're using the Basic_Struts2_Mvn class create the MessageStore class in src/main/java. Be sure to note the package statement below. @@ -39,7 +36,6 @@ If you're using the Basic_Struts2_Ant project to start with create the MessageSt **MessageStore.java** - ```java package org.apache.struts.helloworld.model; @@ -62,11 +58,11 @@ public class MessageStore { } ``` -In the model class above note the use of public set and get methods to allow access to the private message String attribute. The Struts 2 framework requires that objects you want to expose to the view (HelloWorld.jsp) follow the [JavaBean-style conventions](http://en.wikipedia.org/wiki/JavaBean\#JavaBean_conventions). +Note the use of public set and get methods to allow access to the private message String attribute. The Struts 2 framework requires that objects you want to expose to the view (`HelloWorld.jsp`) follow the [JavaBean-style conventions](http://en.wikipedia.org/wiki/JavaBean#JavaBean_conventions). -__Step 2 - Create The Action Class HelloWorldAction.java__ + Step 2 - Create The Action Class HelloWorldAction.java -We need an Action class to act as the Controller. The Action class responds to a user action (in this example that action will be clicking an HTML hyperlink and sending a
[04/16] struts-extras git commit: added HttpsOffloadAwareServletActionRedirectResult
added HttpsOffloadAwareServletActionRedirectResult Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/276471cc Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/276471cc Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/276471cc Branch: refs/heads/master Commit: 276471cc49c84e5016d2beaf7770a5e036e5e191 Parents: 02a1ca6 Author: Stefaan DutryAuthored: Tue Mar 28 08:35:36 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 08:35:36 2017 +0200 -- ...OffloadAwareServletActionRedirectResult.java | 123 +++ .../HttpsOffloadAwareServletRedirectResult.java | 12 ++ 2 files changed, 135 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/276471cc/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java new file mode 100644 index 000..0cd1390 --- /dev/null +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java @@ -0,0 +1,123 @@ +/* + * $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.result; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.dispatcher.mapper.ActionMapping; +import org.apache.struts2.dispatcher.Dispatcher; +import org.apache.struts2.result.ServletRedirectResult; +import org.apache.struts2.views.util.UrlHelper; + +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.ActionInvocation; +import com.opensymphony.xwork2.config.entities.ResultConfig; +import com.opensymphony.xwork2.inject.Inject; + +public class HttpsOffloadAwareServletActionRedirectResult extends HttpsOffloadAwareServletRedirectResult { +/* The default parameter */ +public static final String DEFAULT_PARAM = "actionName"; + +protected String actionName; +protected String namespace; +protected String method; + +public HttpsOffloadAwareServletActionRedirectResult() {} + +public HttpsOffloadAwareServletActionRedirectResult(String actionName) { +this(null, actionName, null, null); +} + +public HttpsOffloadAwareServletActionRedirectResult(String actionName, String method) { +this(null, actionName, method, null); +} + +public HttpsOffloadAwareServletActionRedirectResult(String namespace, String actionName, String method) { +this(namespace, actionName, method, null); +} + +public HttpsOffloadAwareServletActionRedirectResult(String namespace, String actionName, String method, String anchor) { +super(null, anchor); +this.namespace = namespace; +this.actionName = actionName; +this.method = method; +} + +/** + * @see com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation) + */ +public void execute(ActionInvocation invocation) throws Exception { +actionName = conditionalParse(actionName, invocation); +if (namespace == null) { +namespace = invocation.getProxy().getNamespace(); +} else { +namespace = conditionalParse(namespace, invocation); +} +if (method == null) { +method = ""; +} else { +method = conditionalParse(method, invocation); +} + +String tmpLocation =
[10/16] struts-extras git commit: added README.md
added README.md Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/f84e3f23 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/f84e3f23 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/f84e3f23 Branch: refs/heads/master Commit: f84e3f2335065533e33de5e8ebea7d82d1125e8b Parents: 00137f7 Author: Stefaan DutryAuthored: Tue Mar 28 19:12:37 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 19:12:37 2017 +0200 -- README.md | 1 + struts2-custom-results-plugin/README.md | 42 2 files changed, 43 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/f84e3f23/README.md -- diff --git a/README.md b/README.md index e5169d4..c1a5cad 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ mostly focused on fixing (if possibe) vulnerabilities in older versions of the f - [Apache Struts 2 Secure Jakarta Multipart parser plugin](struts2-secure-jakarta-multipart-parser-plugin/README.md) - [Apache Struts 2 Secure Jakarta Stream Multipart parser plugin](struts2-secure-jakarta-stream-multipart-parser-plugin/README.md) +- [Apache Struts 2 Custom results plugin](struts2-custom-results-plugin/README.md) ## License http://git-wip-us.apache.org/repos/asf/struts-extras/blob/f84e3f23/struts2-custom-results-plugin/README.md -- diff --git a/struts2-custom-results-plugin/README.md b/struts2-custom-results-plugin/README.md new file mode 100644 index 000..f19f2fb --- /dev/null +++ b/struts2-custom-results-plugin/README.md @@ -0,0 +1,42 @@ +# Apache Struts 2 Extras - custom results plugin + +[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) + +This plugin provides additional result types. + +## Supported versions + +This plugin can be used with the Apache Struts versions 2.5.x . + +## Result Type categories + +### SSL offloading support + +These result types are made to support redirecting under the https protocol while being behind a SSL offloading proxy. + + Result Types + +# sslOffloadRedirect + +This Result Type should replace the `redirect` Result Type. +It takes into account 2 ways of detecting the offloading: +- `X-Forwarded-Proto` header (de-facto standard header) +- `proto` attribute of the `Forwarded` header ( [RFC7239](https://tools.ietf.org/html/rfc7239) ) + +# sslOffloadRedirectAction + +This Result Type should replace the `redirectAction` Result Type. +It takes into account 2 ways of detecting the offloading: +- `X-Forwarded-Proto` header (de-facto standard header) +- `proto` attribute of the `Forwarded` header ( [RFC7239](https://tools.ietf.org/html/rfc7239) ) + + struts packages + +# ssl-offload + +Only thing this package does is defining the result types so that they can be used. + +# ssl-offload-default + +Merely combines the `struts-default` package and the `ssl-offload` package. +
[12/16] struts-extras git commit: corrected java version
corrected java version Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/6845ba79 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/6845ba79 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/6845ba79 Branch: refs/heads/master Commit: 6845ba79835813ec3a37eeedada7da8139821a15 Parents: 3ca17a4 Author: Stefaan DutryAuthored: Tue Mar 28 21:15:30 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 21:15:30 2017 +0200 -- struts2-custom-results-plugin/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/6845ba79/struts2-custom-results-plugin/pom.xml -- diff --git a/struts2-custom-results-plugin/pom.xml b/struts2-custom-results-plugin/pom.xml index e3cc5e7..db8ebb4 100644 --- a/struts2-custom-results-plugin/pom.xml +++ b/struts2-custom-results-plugin/pom.xml @@ -96,8 +96,8 @@ org.apache.maven.plugins maven-compiler-plugin -1.6 -1.6 +1.7 +1.7
[06/16] struts-extras git commit: extracted overridable method for condition
extracted overridable method for condition Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/785a77fc Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/785a77fc Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/785a77fc Branch: refs/heads/master Commit: 785a77fcfc85c4e8643b1379c3304563bd2705a5 Parents: b4b8c2d Author: Stefaan DutryAuthored: Tue Mar 28 08:45:58 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 08:45:58 2017 +0200 -- .../struts2/result/HttpsOffloadAwareServletRedirectResult.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/785a77fc/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java index a211afb..5c70339 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java @@ -136,7 +136,7 @@ public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResul } protected String fixSchemeIfNeeded(String location, HttpServletRequest request) { -if ("https".equals(request.getHeader("X-Forwarded-Proto"))) { +if (shouldFixScheme(request)) { LOG.debug("https offloading happened, fixing redirectlocation"); StringBuilder fixedLocation = new StringBuilder(); fixedLocation.append("https"); @@ -154,4 +154,8 @@ public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResul } } +protected boolean shouldFixScheme(HttpServletRequest request) { +return "https".equals(request.getHeader("X-Forwarded-Proto")); +} + }
[11/16] struts-extras git commit: defined dependencies as optional
defined dependencies as optional Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/3ca17a46 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/3ca17a46 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/3ca17a46 Branch: refs/heads/master Commit: 3ca17a46dd1432404967566ea6218120dbcf8aec Parents: f84e3f2 Author: Stefaan DutryAuthored: Tue Mar 28 21:13:31 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 21:13:31 2017 +0200 -- struts2-custom-results-plugin/pom.xml | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/3ca17a46/struts2-custom-results-plugin/pom.xml -- diff --git a/struts2-custom-results-plugin/pom.xml b/struts2-custom-results-plugin/pom.xml index b0efc2d..e3cc5e7 100644 --- a/struts2-custom-results-plugin/pom.xml +++ b/struts2-custom-results-plugin/pom.xml @@ -71,12 +71,14 @@ org.apache.struts struts2-core 2.5.10.1 +true org.apache.logging.log4j log4j-api 2.8 +true
[14/16] struts-extras git commit: change method modifier to protected
change method modifier to protected Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/6ac80743 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/6ac80743 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/6ac80743 Branch: refs/heads/master Commit: 6ac80743f253c0f5581c15a41c28b4e11e44abb4 Parents: 5df13a8 Author: Stefaan DutryAuthored: Tue Mar 28 21:20:05 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 21:20:05 2017 +0200 -- .../struts2/result/SslOffloadAwareServletRedirectResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/6ac80743/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java index 6a1b4d3..c540ad0 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java @@ -160,7 +160,7 @@ public class SslOffloadAwareServletRedirectResult extends ServletRedirectResult return "https".equals(request.getHeader("X-Forwarded-Proto")) || hasForwardedHeaderWithProtoParamHttps(request); } -private boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest request) { +protected boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest request) { Enumeration forwardedHeaders = request.getHeaders("Forwarded"); if (forwardedHeaders == null) {
[03/16] struts-extras git commit: fixed struts version
fixed struts version Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/02a1ca68 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/02a1ca68 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/02a1ca68 Branch: refs/heads/master Commit: 02a1ca6819aa355574930285a0990a8b080bdd4a Parents: 7879baf Author: Stefaan DutryAuthored: Tue Mar 28 08:23:12 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 08:23:12 2017 +0200 -- struts2-custom-results-plugin/pom.xml | 2 +- .../HttpsOffloadAwareServletRedirectResult.java | 146 --- .../HttpsOffloadAwareServletRedirectResult.java | 145 ++ 3 files changed, 146 insertions(+), 147 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/02a1ca68/struts2-custom-results-plugin/pom.xml -- diff --git a/struts2-custom-results-plugin/pom.xml b/struts2-custom-results-plugin/pom.xml index 44eadde..b0efc2d 100644 --- a/struts2-custom-results-plugin/pom.xml +++ b/struts2-custom-results-plugin/pom.xml @@ -70,7 +70,7 @@ org.apache.struts struts2-core -2.3.20.1 +2.5.10.1 http://git-wip-us.apache.org/repos/asf/struts-extras/blob/02a1ca68/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java deleted file mode 100644 index b3ee26a..000 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java +++ /dev/null @@ -1,146 +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.dispatcher; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.dispatcher.Dispatcher; -import org.apache.struts2.dispatcher.ServletRedirectResult; -import org.apache.struts2.dispatcher.mapper.ActionMapping; -import org.apache.struts2.views.util.UrlHelper; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.inject.Inject; - -public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResult { -private static final long serialVersionUID = -5384946213381645549L; -private static final Logger LOG = LogManager.getLogger(HttpsOffloadAwareServletRedirectResult.class); - -private UrlHelper urlHelper; - -@Inject -public void setUrlHelper(UrlHelper urlHelper) { -this.urlHelper = urlHelper; -} - -/** - * Redirects to the location specified by calling - * {@link HttpServletResponse#sendRedirect(String)}. - * - * @param finalLocation - *the location to redirect to. - * @param invocation - *an encapsulation of the action execution state. - * @throws Exception - * if an error occurs when redirecting. - */ -protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { -ActionContext ctx = invocation.getInvocationContext(); -HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST); -HttpServletResponse response =
[08/16] struts-extras git commit: renamed https offloading to the more widely used ssl offloading
renamed https offloading to the more widely used ssl offloading Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/b3ce14c9 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/b3ce14c9 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/b3ce14c9 Branch: refs/heads/master Commit: b3ce14c9e744ca713373b358f71f0659bfb35803 Parents: ba12972 Author: Stefaan DutryAuthored: Tue Mar 28 16:25:06 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 16:25:06 2017 +0200 -- ...OffloadAwareServletActionRedirectResult.java | 123 .../HttpsOffloadAwareServletRedirectResult.java | 188 --- ...OffloadAwareServletActionRedirectResult.java | 123 .../SslOffloadAwareServletRedirectResult.java | 188 +++ 4 files changed, 311 insertions(+), 311 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/b3ce14c9/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java deleted file mode 100644 index 0cd1390..000 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java +++ /dev/null @@ -1,123 +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.result; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.dispatcher.mapper.ActionMapping; -import org.apache.struts2.dispatcher.Dispatcher; -import org.apache.struts2.result.ServletRedirectResult; -import org.apache.struts2.views.util.UrlHelper; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.inject.Inject; - -public class HttpsOffloadAwareServletActionRedirectResult extends HttpsOffloadAwareServletRedirectResult { -/* The default parameter */ -public static final String DEFAULT_PARAM = "actionName"; - -protected String actionName; -protected String namespace; -protected String method; - -public HttpsOffloadAwareServletActionRedirectResult() {} - -public HttpsOffloadAwareServletActionRedirectResult(String actionName) { -this(null, actionName, null, null); -} - -public HttpsOffloadAwareServletActionRedirectResult(String actionName, String method) { -this(null, actionName, method, null); -} - -public HttpsOffloadAwareServletActionRedirectResult(String namespace, String actionName, String method) { -this(namespace, actionName, method, null); -} - -public HttpsOffloadAwareServletActionRedirectResult(String namespace, String actionName, String method, String anchor) { -super(null, anchor); -this.namespace = namespace; -this.actionName = actionName; -this.method = method; -} - -/** - * @see com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation) - */ -public void execute(ActionInvocation invocation) throws Exception { -actionName = conditionalParse(actionName, invocation); -if (namespace == null) { -namespace = invocation.getProxy().getNamespace(); -} else { -namespace = conditionalParse(namespace, invocation); -} -
[15/16] struts-extras git commit: extracted method for X-Forwarded-Proto header check
extracted method for X-Forwarded-Proto header check Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/d74f9cc5 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/d74f9cc5 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/d74f9cc5 Branch: refs/heads/master Commit: d74f9cc50e26b0ac82f3c7707893462b0289538a Parents: 6ac8074 Author: Stefaan DutryAuthored: Tue Mar 28 21:23:19 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 21:23:19 2017 +0200 -- .../struts2/result/SslOffloadAwareServletRedirectResult.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/d74f9cc5/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java index c540ad0..0955f8a 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java @@ -157,7 +157,11 @@ public class SslOffloadAwareServletRedirectResult extends ServletRedirectResult } protected boolean shouldFixScheme(HttpServletRequest request) { -return "https".equals(request.getHeader("X-Forwarded-Proto")) || hasForwardedHeaderWithProtoParamHttps(request); +return hasXForwardedProtoHttps(request) || hasForwardedHeaderWithProtoParamHttps(request); +} + +protected boolean hasXForwardedProtoHttps(HttpServletRequest request) { +return "https".equals(request.getHeader("X-Forwarded-Proto")); } protected boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest request) {
[05/16] struts-extras git commit: make method protected instead of private
make method protected instead of private Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/b4b8c2d7 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/b4b8c2d7 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/b4b8c2d7 Branch: refs/heads/master Commit: b4b8c2d7e962d1206a473bfdad47689895ff874b Parents: 276471c Author: Stefaan DutryAuthored: Tue Mar 28 08:40:20 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 08:40:20 2017 +0200 -- .../struts2/result/HttpsOffloadAwareServletRedirectResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/b4b8c2d7/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java index 9de6739..a211afb 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java @@ -135,7 +135,7 @@ public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResul sendRedirect(response, finalLocation); } -private String fixSchemeIfNeeded(String location, HttpServletRequest request) { +protected String fixSchemeIfNeeded(String location, HttpServletRequest request) { if ("https".equals(request.getHeader("X-Forwarded-Proto"))) { LOG.debug("https offloading happened, fixing redirectlocation"); StringBuilder fixedLocation = new StringBuilder();
[09/16] struts-extras git commit: added struts-plugin.xml providing both a ssl-offload package and a convenience ssl-offload-default package
added struts-plugin.xml providing both a ssl-offload package and a convenience ssl-offload-default package Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/00137f77 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/00137f77 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/00137f77 Branch: refs/heads/master Commit: 00137f775abae1859743c5aedb3b1b0d23b71315 Parents: b3ce14c Author: Stefaan DutryAuthored: Tue Mar 28 16:43:22 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 16:43:22 2017 +0200 -- .../src/main/resources/struts-plugin.xml | 18 ++ 1 file changed, 18 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/00137f77/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml -- diff --git a/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml b/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml new file mode 100644 index 000..a47009e --- /dev/null +++ b/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml @@ -0,0 +1,18 @@ + + +http://struts.apache.org/dtds/struts-2.5.dtd;> + + + + + + + + + + + + +
[07/16] struts-extras git commit: added support for the Forwarded header (RFC7239)
added support for the Forwarded header (RFC7239) Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/ba12972c Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/ba12972c Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/ba12972c Branch: refs/heads/master Commit: ba12972cbc0e030a20dec11cf6a0b4dd2360aafd Parents: 785a77f Author: Stefaan DutryAuthored: Tue Mar 28 13:24:52 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 13:24:52 2017 +0200 -- .../HttpsOffloadAwareServletRedirectResult.java | 29 +++- 1 file changed, 28 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/ba12972c/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java index 5c70339..3431467 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java @@ -22,8 +22,11 @@ package org.apache.struts2.result; import java.util.Collection; +import java.util.Enumeration; import java.util.List; import java.util.Map; +import java.util.regex.Pattern; +import java.util.regex.Matcher; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -44,6 +47,7 @@ import com.opensymphony.xwork2.inject.Inject; public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResult { private static final long serialVersionUID = -5384946213381645549L; private static final Logger LOG = LogManager.getLogger(HttpsOffloadAwareServletRedirectResult.class); +private static final Pattern FORWARDED_PROTO_PARAM_HTTPS = Pattern.compile("[^;]proto=https[$;]"); private UrlHelper urlHelper; @@ -155,7 +159,30 @@ public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResul } protected boolean shouldFixScheme(HttpServletRequest request) { -return "https".equals(request.getHeader("X-Forwarded-Proto")); +return "https".equals(request.getHeader("X-Forwarded-Proto")) || hasForwardedHeaderWithProtoParamHttps(request); +} + +private boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest request) { +Enumeration forwardedHeaders = request.getHeaders("Forwarded"); + +if (forwardedHeaders == null) { +return false; +} + +while (forwardedHeaders.hasMoreElements()) { +String forwardedHeader = forwardedHeaders.nextElement(); +String[] forwardedHeaderElements = forwardedHeader.split(","); + +for (String forwardedHeaderElement : forwardedHeaderElements) { +Matcher matcher = FORWARDED_PROTO_PARAM_HTTPS.matcher(forwardedHeaderElement.trim()); + +if (matcher.matches()) { +return true; +} +} +} + +return false; } }
[16/16] struts-extras git commit: added information on how to register the Result Types
added information on how to register the Result Types Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/c056b516 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/c056b516 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/c056b516 Branch: refs/heads/master Commit: c056b516acdd518ea4e1fa8b66d950e20299dcee Parents: d74f9cc Author: Stefaan DutryAuthored: Tue Mar 28 21:45:04 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 21:45:04 2017 +0200 -- struts2-custom-results-plugin/README.md | 39 1 file changed, 39 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/c056b516/struts2-custom-results-plugin/README.md -- diff --git a/struts2-custom-results-plugin/README.md b/struts2-custom-results-plugin/README.md index f19f2fb..bf1e147 100644 --- a/struts2-custom-results-plugin/README.md +++ b/struts2-custom-results-plugin/README.md @@ -40,3 +40,42 @@ Only thing this package does is defining the result types so that they can be us Merely combines the `struts-default` package and the `ssl-offload` package. + How to use + +The requirement for using these Result Types is that they are defined. + +This could be done in a couple ways: + +*Defining the types manualy in your own package* + +The Result Types can be registered in your own package as follows: + +```xml + + + + + +... + +``` + +*Using the ssl-offload package as a parent* + +You can also just specify the `ssl-offload` package as a parent your package extends from. + +```xml + +... + +``` + +*Using the ssl-offload-default as a parent* + +You can also just specify the `ssl-offload-default` package as a parent your package extends from. This should have the same effect as extending both `struts-default` and `ssl-offload` + +```xml + +... + +```
[13/16] struts-extras git commit: removed $Id$ tag
removed $Id$ tag Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/5df13a81 Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/5df13a81 Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/5df13a81 Branch: refs/heads/master Commit: 5df13a81305c4943015cf43426622eb04698f280 Parents: 6845ba7 Author: Stefaan DutryAuthored: Tue Mar 28 21:17:57 2017 +0200 Committer: Stefaan Dutry Committed: Tue Mar 28 21:17:57 2017 +0200 -- .../struts2/result/SslOffloadAwareServletActionRedirectResult.java | 2 -- .../struts2/result/SslOffloadAwareServletRedirectResult.java | 2 -- 2 files changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/5df13a81/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java index 7c812f4..a52ebfb 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java @@ -1,6 +1,4 @@ /* - * $Id$ - * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information http://git-wip-us.apache.org/repos/asf/struts-extras/blob/5df13a81/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java index 399c6f8..6a1b4d3 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java @@ -1,6 +1,4 @@ /* - * $Id$ - * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information
[01/16] struts-extras git commit: added HttpsOffloadAwareServletRedirectResult
Repository: struts-extras Updated Branches: refs/heads/master 8e1aadda4 -> c056b516a added HttpsOffloadAwareServletRedirectResult Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/1a64217f Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/1a64217f Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/1a64217f Branch: refs/heads/master Commit: 1a64217f87566831864371622673951d29dca79a Parents: 8e1aadd Author: Stefaan DutryAuthored: Mon Mar 27 23:20:48 2017 +0200 Committer: Stefaan Dutry Committed: Mon Mar 27 23:20:48 2017 +0200 -- struts2-custom-results-plugin/pom.xml | 104 + .../HttpsOffloadAwareServletRedirectResult.java | 146 +++ 2 files changed, 250 insertions(+) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/1a64217f/struts2-custom-results-plugin/pom.xml -- diff --git a/struts2-custom-results-plugin/pom.xml b/struts2-custom-results-plugin/pom.xml new file mode 100644 index 000..44eadde --- /dev/null +++ b/struts2-custom-results-plugin/pom.xml @@ -0,0 +1,104 @@ + + +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/xsd/maven-4.0.0.xsd;> + + +org.apache.struts +struts-master +10 + + +4.0.0 + +struts2-custom-results-plugin +1.2-SNAPSHOT +jar +struts2 custom results plugin + + +This plugin defines some additional result types + + + +UTF-8 + + + +scm:git:git://git.apache.org/struts-extras.git + scm:git:https://git-wip-us.apache.org/repos/asf/struts-extras.git +http://git.apache.org/struts-extras.git +HEAD + + + +JIRA +https://issues.apache.org/jira/browse/WW + + + +Jenkins +https://builds.apache.org/hudson/view/S-Z/view/Struts + + +mail + +d...@struts.apache.org + + + + + + + + +org.apache.struts +struts2-core +2.3.20.1 + + + +org.apache.logging.log4j +log4j-api +2.8 + + + +javax.servlet +servlet-api +2.4 +provided + + + + + + + +org.apache.maven.plugins +maven-compiler-plugin + +1.6 +1.6 + + + + + + http://git-wip-us.apache.org/repos/asf/struts-extras/blob/1a64217f/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java new file mode 100644 index 000..751e783 --- /dev/null +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java @@ -0,0 +1,146 @@ +/* + * $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.dispatcher; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.dispatcher.Dispatcher; +import
[02/16] struts-extras git commit: used spaces for indentation
used spaces for indentation Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/7879bafe Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/7879bafe Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/7879bafe Branch: refs/heads/master Commit: 7879bafe58fd7d82d8e31f34dd88736e337f0a12 Parents: 1a64217 Author: Stefaan DutryAuthored: Mon Mar 27 23:25:40 2017 +0200 Committer: Stefaan Dutry Committed: Mon Mar 27 23:25:40 2017 +0200 -- .../HttpsOffloadAwareServletRedirectResult.java | 200 +-- 1 file changed, 100 insertions(+), 100 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts-extras/blob/7879bafe/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java -- diff --git a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java index 751e783..b3ee26a 100644 --- a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java +++ b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java @@ -42,105 +42,105 @@ import com.opensymphony.xwork2.config.entities.ResultConfig; import com.opensymphony.xwork2.inject.Inject; public class HttpsOffloadAwareServletRedirectResult extends ServletRedirectResult { - private static final long serialVersionUID = -5384946213381645549L; - private static final Logger LOG = LogManager.getLogger(HttpsOffloadAwareServletRedirectResult.class); - - private UrlHelper urlHelper; - - @Inject - public void setUrlHelper(UrlHelper urlHelper) { - this.urlHelper = urlHelper; - } - - /** -* Redirects to the location specified by calling -* {@link HttpServletResponse#sendRedirect(String)}. -* -* @param finalLocation -*the location to redirect to. -* @param invocation -*an encapsulation of the action execution state. -* @throws Exception -* if an error occurs when redirecting. -*/ - protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { - ActionContext ctx = invocation.getInvocationContext(); - HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST); - HttpServletResponse response = (HttpServletResponse) ctx.get(ServletActionContext.HTTP_RESPONSE); - - if (isPathUrl(finalLocation)) { - if (!finalLocation.startsWith("/")) { - ActionMapping mapping = actionMapper.getMapping(request, - Dispatcher.getInstance().getConfigurationManager()); - String namespace = null; - if (mapping != null) { - namespace = mapping.getNamespace(); - } - - if ((namespace != null) && (namespace.length() > 0) && (!"/".equals(namespace))) { - finalLocation = namespace + "/" + finalLocation; - } else { - finalLocation = "/" + finalLocation; - } - } - - // if the URL's are relative to the servlet context, append the - // servlet context path - if (prependServletContext && (request.getContextPath() != null) - && (request.getContextPath().length() > 0)) { - finalLocation = request.getContextPath() + finalLocation; - } - - finalLocation = fixSchemeIfNeeded(finalLocation, request); - } - ResultConfig resultConfig = invocation.getProxy().getConfig().getResults().get(invocation.getResultCode()); - if (resultConfig != null) { - Map resultConfigParams = resultConfig.getParams(); - - List prohibitedResultParams = getProhibitedResultParams(); - for (Map.Entry e : resultConfigParams.entrySet()) { - if
struts git commit: WW-4770 Fixes problem with dojo.version
Repository: struts Updated Branches: refs/heads/support-2-3 c349dfa5a -> 9e8627ca6 WW-4770 Fixes problem with dojo.version Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9e8627ca Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9e8627ca Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9e8627ca Branch: refs/heads/support-2-3 Commit: 9e8627ca669ec566bbedd638fc6010e8ae364160 Parents: c349dfa Author: Stefaan DutryAuthored: Fri Mar 24 21:34:31 2017 +0100 Committer: Stefaan Dutry Committed: Fri Mar 24 21:34:31 2017 +0100 -- .../dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js | 2 +- .../org/apache/struts2/static/dojo/dojo.js.uncompressed.js | 2 +- .../org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/struts/blob/9e8627ca/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js -- diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js index 862371a..f71b675 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js @@ -33,7 +33,7 @@ dojo.global=function(){ return dj_currentContext; }; dojo.locale=djConfig.locale; -dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev$".match(/[0-9]+/)[0]),toString:function(){ +dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 670371 $".match(/[0-9]+/)[0]),toString:function(){ with(dojo.version){ return major+"."+minor+"."+patch+flag+" ("+revision+")"; } http://git-wip-us.apache.org/repos/asf/struts/blob/9e8627ca/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js -- diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js index eb451b2..c994cbd 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js @@ -100,7 +100,7 @@ dojo.locale = djConfig.locale; dojo.version = { // summary: version number of this instance of dojo. major: 0, minor: 4, patch: 3, flag: "", - revision: Number("$Rev$".match(/[0-9]+/)[0]), + revision: Number("$Rev: 670371 $".match(/[0-9]+/)[0]), toString: function(){ with(dojo.version){ return major + "." + minor + "." + patch + flag + " (" + revision + ")";// String http://git-wip-us.apache.org/repos/asf/struts/blob/9e8627ca/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js -- diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js index 36f2497..89985a5 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js @@ -90,7 +90,7 @@ dojo.locale = djConfig.locale; dojo.version = { // summary: version number of this instance of dojo. major: 0, minor: 4, patch: 3, flag: "", - revision: Number("$Rev$".match(/[0-9]+/)[0]), + revision: Number("$Rev: 670371 $".match(/[0-9]+/)[0]), toString: function(){ with(dojo.version){ return major + "." + minor + "." + patch + flag + " (" + revision + ")";// String