struts git commit: [maven-release-plugin] prepare release STRUTS_2_5_12

2017-07-06 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master 666271ccd -> ee74aea44


[maven-release-plugin] prepare release STRUTS_2_5_12


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

Branch: refs/heads/master
Commit: ee74aea445883ff5ee235190722aa0fb04640a2e
Parents: 666271c
Author: Lukasz Lenart 
Authored: Thu Jul 6 09:40:05 2017 +0200
Committer: Lukasz Lenart 
Committed: Thu Jul 6 09:40:05 2017 +0200

--
 apps/pom.xml| 2 +-
 apps/rest-showcase/pom.xml  | 4 ++--
 apps/showcase/pom.xml   | 2 +-
 assembly/pom.xml| 2 +-
 bom/pom.xml | 8 ++--
 bundles/admin/pom.xml   | 2 +-
 bundles/demo/pom.xml| 2 +-
 bundles/pom.xml | 2 +-
 core/pom.xml| 2 +-
 plugins/bean-validation/pom.xml | 2 +-
 plugins/cdi/pom.xml | 2 +-
 plugins/config-browser/pom.xml  | 2 +-
 plugins/convention/pom.xml  | 2 +-
 plugins/dwr/pom.xml | 2 +-
 plugins/embeddedjsp/pom.xml | 2 +-
 plugins/gxp/pom.xml | 2 +-
 plugins/jasperreports/pom.xml   | 2 +-
 plugins/javatemplates/pom.xml   | 2 +-
 plugins/jfreechart/pom.xml  | 2 +-
 plugins/json/pom.xml| 2 +-
 plugins/junit/pom.xml   | 2 +-
 plugins/osgi/pom.xml| 2 +-
 plugins/oval/pom.xml| 2 +-
 plugins/pell-multipart/pom.xml  | 2 +-
 plugins/plexus/pom.xml  | 2 +-
 plugins/pom.xml | 2 +-
 plugins/portlet-tiles/pom.xml   | 2 +-
 plugins/portlet/pom.xml | 2 +-
 plugins/rest/pom.xml| 2 +-
 plugins/sitegraph/pom.xml   | 2 +-
 plugins/sitemesh/pom.xml| 2 +-
 plugins/spring/pom.xml  | 2 +-
 plugins/testng/pom.xml  | 2 +-
 plugins/tiles/pom.xml   | 2 +-
 pom.xml | 4 ++--
 35 files changed, 42 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/ee74aea4/apps/pom.xml
--
diff --git a/apps/pom.xml b/apps/pom.xml
index dbf0824..61e3458 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -26,7 +26,7 @@
 
 org.apache.struts
 struts2-parent
-2.5.12-SNAPSHOT
+2.5.12
 
 struts2-apps
 pom

http://git-wip-us.apache.org/repos/asf/struts/blob/ee74aea4/apps/rest-showcase/pom.xml
--
diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml
index b7a3e81..b3f975c 100644
--- a/apps/rest-showcase/pom.xml
+++ b/apps/rest-showcase/pom.xml
@@ -26,12 +26,12 @@
 
 org.apache.struts
 struts2-apps
-2.5.12-SNAPSHOT
+2.5.12
 
 
 struts2-rest-showcase
 war
-2.5.12-SNAPSHOT
+2.5.12
 Struts 2 Rest Showcase Webapp
 Struts 2 Rest Showcase Example
 

http://git-wip-us.apache.org/repos/asf/struts/blob/ee74aea4/apps/showcase/pom.xml
--
diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml
index c6a4e29..0a43a3f 100644
--- a/apps/showcase/pom.xml
+++ b/apps/showcase/pom.xml
@@ -26,7 +26,7 @@
 
 org.apache.struts
 struts2-apps
-2.5.12-SNAPSHOT
+2.5.12
 
 
 struts2-showcase

http://git-wip-us.apache.org/repos/asf/struts/blob/ee74aea4/assembly/pom.xml
--
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 612dae8..10a6987 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -3,7 +3,7 @@
 
 org.apache.struts
 struts2-parent
-2.5.12-SNAPSHOT
+2.5.12
 
 
 struts2-assembly

http://git-wip-us.apache.org/repos/asf/struts/blob/ee74aea4/bom/pom.xml
--
diff --git a/bom/pom.xml b/bom/pom.xml
index 0d2258d..c03ef62 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -10,7 +10,7 @@
 
 
 struts2-bom
-2.5.12-SNAPSHOT
+2.5.12
 pom
 
 Struts 2 Bill of Materials
@@ -25,7 +25,7 @@
 
 
 
-2.5.12-SNAPSHOT
+2.5.12
 
 
 
@@ -170,4 +170,8 @@
 
 
 
+
+  
+STRUTS_2_5_12
+  
 

http://git-wip-us.apache.org/repos/asf/struts/blob/ee74aea4/bundles/admin/pom.xml
--
diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml
index 84de84d..a836485 100644
--- a/bundles/admin/pom.xml
+++ b/bundles/admin/pom.xml
@@ -4,7 +4,7 @@
 
 org.apache.struts
 struts2-osgi-bundles
- 

[struts] Git Push Summary

2017-07-06 Thread lukaszlenart
Repository: struts
Updated Tags:  refs/tags/STRUTS_2_5_12 [created] 80112c4af


struts git commit: [maven-release-plugin] prepare for next development iteration

2017-07-06 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master ee74aea44 -> cf7bfe63e


[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/master
Commit: cf7bfe63e25589edf2cb1a7ed23bb134348a90e4
Parents: ee74aea
Author: Lukasz Lenart 
Authored: Thu Jul 6 09:40:39 2017 +0200
Committer: Lukasz Lenart 
Committed: Thu Jul 6 09:40:39 2017 +0200

--
 apps/pom.xml| 2 +-
 apps/rest-showcase/pom.xml  | 4 ++--
 apps/showcase/pom.xml   | 2 +-
 assembly/pom.xml| 2 +-
 bom/pom.xml | 8 ++--
 bundles/admin/pom.xml   | 2 +-
 bundles/demo/pom.xml| 2 +-
 bundles/pom.xml | 2 +-
 core/pom.xml| 2 +-
 plugins/bean-validation/pom.xml | 2 +-
 plugins/cdi/pom.xml | 2 +-
 plugins/config-browser/pom.xml  | 2 +-
 plugins/convention/pom.xml  | 2 +-
 plugins/dwr/pom.xml | 2 +-
 plugins/embeddedjsp/pom.xml | 2 +-
 plugins/gxp/pom.xml | 2 +-
 plugins/jasperreports/pom.xml   | 2 +-
 plugins/javatemplates/pom.xml   | 2 +-
 plugins/jfreechart/pom.xml  | 2 +-
 plugins/json/pom.xml| 2 +-
 plugins/junit/pom.xml   | 2 +-
 plugins/osgi/pom.xml| 2 +-
 plugins/oval/pom.xml| 2 +-
 plugins/pell-multipart/pom.xml  | 2 +-
 plugins/plexus/pom.xml  | 2 +-
 plugins/pom.xml | 2 +-
 plugins/portlet-tiles/pom.xml   | 2 +-
 plugins/portlet/pom.xml | 2 +-
 plugins/rest/pom.xml| 2 +-
 plugins/sitegraph/pom.xml   | 2 +-
 plugins/sitemesh/pom.xml| 2 +-
 plugins/spring/pom.xml  | 2 +-
 plugins/testng/pom.xml  | 2 +-
 plugins/tiles/pom.xml   | 2 +-
 pom.xml | 4 ++--
 35 files changed, 38 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/cf7bfe63/apps/pom.xml
--
diff --git a/apps/pom.xml b/apps/pom.xml
index 61e3458..626e702 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -26,7 +26,7 @@
 
 org.apache.struts
 struts2-parent
-2.5.12
+2.5.13-SNAPSHOT
 
 struts2-apps
 pom

http://git-wip-us.apache.org/repos/asf/struts/blob/cf7bfe63/apps/rest-showcase/pom.xml
--
diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml
index b3f975c..73c33de 100644
--- a/apps/rest-showcase/pom.xml
+++ b/apps/rest-showcase/pom.xml
@@ -26,12 +26,12 @@
 
 org.apache.struts
 struts2-apps
-2.5.12
+2.5.13-SNAPSHOT
 
 
 struts2-rest-showcase
 war
-2.5.12
+2.5.13-SNAPSHOT
 Struts 2 Rest Showcase Webapp
 Struts 2 Rest Showcase Example
 

http://git-wip-us.apache.org/repos/asf/struts/blob/cf7bfe63/apps/showcase/pom.xml
--
diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml
index 0a43a3f..868d51f 100644
--- a/apps/showcase/pom.xml
+++ b/apps/showcase/pom.xml
@@ -26,7 +26,7 @@
 
 org.apache.struts
 struts2-apps
-2.5.12
+2.5.13-SNAPSHOT
 
 
 struts2-showcase

http://git-wip-us.apache.org/repos/asf/struts/blob/cf7bfe63/assembly/pom.xml
--
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 10a6987..0a47af1 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -3,7 +3,7 @@
 
 org.apache.struts
 struts2-parent
-2.5.12
+2.5.13-SNAPSHOT
 
 
 struts2-assembly

http://git-wip-us.apache.org/repos/asf/struts/blob/cf7bfe63/bom/pom.xml
--
diff --git a/bom/pom.xml b/bom/pom.xml
index c03ef62..324e71e 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -10,7 +10,7 @@
 
 
 struts2-bom
-2.5.12
+2.5.13-SNAPSHOT
 pom
 
 Struts 2 Bill of Materials
@@ -25,7 +25,7 @@
 
 
 
-2.5.12
+2.5.13-SNAPSHOT
 
 
 
@@ -170,8 +170,4 @@
 
 
 
-
-  
-STRUTS_2_5_12
-  
 

http://git-wip-us.apache.org/repos/asf/struts/blob/cf7bfe63/bundles/admin/pom.xml
--
diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml
index a836485..6bd52a3 100644
--- a/bundles/admin/pom.xml
+++ b/bundles/admin/pom.xml
@@ -4,7 +4,7 @@
 
 org.apache.struts
 struts2-osgi-b

svn commit: r20324 - /dev/struts/2.5.12/

2017-07-06 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jul  6 08:45:01 2017
New Revision: 20324

Log:
Updates test release 2.5.12

Added:
dev/struts/2.5.12/
dev/struts/2.5.12/struts-2.5.12-all.zip   (with props)
dev/struts/2.5.12/struts-2.5.12-all.zip.asc   (with props)
dev/struts/2.5.12/struts-2.5.12-all.zip.md5
dev/struts/2.5.12/struts-2.5.12-all.zip.sha1
dev/struts/2.5.12/struts-2.5.12-apps.zip   (with props)
dev/struts/2.5.12/struts-2.5.12-apps.zip.asc   (with props)
dev/struts/2.5.12/struts-2.5.12-apps.zip.md5
dev/struts/2.5.12/struts-2.5.12-apps.zip.sha1
dev/struts/2.5.12/struts-2.5.12-docs.zip   (with props)
dev/struts/2.5.12/struts-2.5.12-docs.zip.asc   (with props)
dev/struts/2.5.12/struts-2.5.12-docs.zip.md5
dev/struts/2.5.12/struts-2.5.12-docs.zip.sha1
dev/struts/2.5.12/struts-2.5.12-lib.zip   (with props)
dev/struts/2.5.12/struts-2.5.12-lib.zip.asc   (with props)
dev/struts/2.5.12/struts-2.5.12-lib.zip.md5
dev/struts/2.5.12/struts-2.5.12-lib.zip.sha1
dev/struts/2.5.12/struts-2.5.12-min-lib.zip   (with props)
dev/struts/2.5.12/struts-2.5.12-min-lib.zip.asc   (with props)
dev/struts/2.5.12/struts-2.5.12-min-lib.zip.md5
dev/struts/2.5.12/struts-2.5.12-min-lib.zip.sha1
dev/struts/2.5.12/struts-2.5.12-src.zip   (with props)
dev/struts/2.5.12/struts-2.5.12-src.zip.asc   (with props)
dev/struts/2.5.12/struts-2.5.12-src.zip.md5
dev/struts/2.5.12/struts-2.5.12-src.zip.sha1

Added: dev/struts/2.5.12/struts-2.5.12-all.zip
==
Binary file - no diff available.

Propchange: dev/struts/2.5.12/struts-2.5.12-all.zip
--
svn:mime-type = application/zip

Added: dev/struts/2.5.12/struts-2.5.12-all.zip.asc
==
Binary file - no diff available.

Propchange: dev/struts/2.5.12/struts-2.5.12-all.zip.asc
--
svn:mime-type = application/pgp-signature

Added: dev/struts/2.5.12/struts-2.5.12-all.zip.md5
==
--- dev/struts/2.5.12/struts-2.5.12-all.zip.md5 (added)
+++ dev/struts/2.5.12/struts-2.5.12-all.zip.md5 Thu Jul  6 08:45:01 2017
@@ -0,0 +1 @@
+3180e6e5420ca3a6c50250a0053aab3b
\ No newline at end of file

Added: dev/struts/2.5.12/struts-2.5.12-all.zip.sha1
==
--- dev/struts/2.5.12/struts-2.5.12-all.zip.sha1 (added)
+++ dev/struts/2.5.12/struts-2.5.12-all.zip.sha1 Thu Jul  6 08:45:01 2017
@@ -0,0 +1 @@
+5e952f0430828f3b262ac6bb4f0d52b9ccb2e151
\ No newline at end of file

Added: dev/struts/2.5.12/struts-2.5.12-apps.zip
==
Binary file - no diff available.

Propchange: dev/struts/2.5.12/struts-2.5.12-apps.zip
--
svn:mime-type = application/zip

Added: dev/struts/2.5.12/struts-2.5.12-apps.zip.asc
==
Binary file - no diff available.

Propchange: dev/struts/2.5.12/struts-2.5.12-apps.zip.asc
--
svn:mime-type = application/pgp-signature

Added: dev/struts/2.5.12/struts-2.5.12-apps.zip.md5
==
--- dev/struts/2.5.12/struts-2.5.12-apps.zip.md5 (added)
+++ dev/struts/2.5.12/struts-2.5.12-apps.zip.md5 Thu Jul  6 08:45:01 2017
@@ -0,0 +1 @@
+ed3447ee96d012194919f8ecb30f8272
\ No newline at end of file

Added: dev/struts/2.5.12/struts-2.5.12-apps.zip.sha1
==
--- dev/struts/2.5.12/struts-2.5.12-apps.zip.sha1 (added)
+++ dev/struts/2.5.12/struts-2.5.12-apps.zip.sha1 Thu Jul  6 08:45:01 2017
@@ -0,0 +1 @@
+3023025109f35166c9b4515276b6c85bd1f1f06f
\ No newline at end of file

Added: dev/struts/2.5.12/struts-2.5.12-docs.zip
==
Binary file - no diff available.

Propchange: dev/struts/2.5.12/struts-2.5.12-docs.zip
--
svn:mime-type = application/zip

Added: dev/struts/2.5.12/struts-2.5.12-docs.zip.asc
==
Binary file - no diff available.

Propchange: dev/struts/2.5.12/struts-2.5.12-docs.zip.asc
--
svn:mime-type = application/pgp-signature

Added: dev/struts/2.5.12/struts-2.5.12-docs.zip.md5
=

[1/2] struts-examples git commit: Upgrades to the latest Struts version

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master d07e95420 -> 57df7ba5b


Upgrades to the latest Struts version


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

Branch: refs/heads/master
Commit: 58b66fb2e81213f0a10a84bcb60ed88b6e974f5d
Parents: d07e954
Author: Lukasz Lenart 
Authored: Fri Jul 7 07:26:01 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 07:26:01 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/58b66fb2/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 16778d5..a982693 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
 
 
 UTF-8
-2.5.11-SNAPSHOT
+2.5.12
 2.8.2
 
 



[2/2] struts-examples git commit: Adds support for Travis

2017-07-06 Thread lukaszlenart
Adds support for Travis


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

Branch: refs/heads/master
Commit: 57df7ba5bcf808c8cef2b82813163e5756382800
Parents: 58b66fb
Author: Lukasz Lenart 
Authored: Fri Jul 7 07:27:44 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 07:27:44 2017 +0200

--
 .travis.yml | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/57df7ba5/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..b735fb7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,9 @@
+language: java
+sudo: false
+
+jdk:
+  - openjdk7
+  - oraclejdk8
+
+install: true
+script: mvn test
\ No newline at end of file



[09/10] struts-examples git commit: Final clean up for comitting CRUD TODOs

2017-07-06 Thread lukaszlenart
Final clean up for comitting CRUD TODOs


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

Branch: refs/heads/master
Commit: dec0643fb2eb005d4dde3582f402299431b75fb4
Parents: 1ce1a4f
Author: Antonio Sánchez 
Authored: Mon May 5 17:08:03 2014 +0200
Committer: Antonio Sánchez 
Committed: Mon May 5 17:08:03 2014 +0200

--
 .../apache/struts/crud/action/PersonAction.java | 22 +++-
 .../apache/struts/crud/dao/MemoryPersonDao.java |  7 ---
 crud/src/main/resources/log4j.xml   | 10 +
 3 files changed, 17 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/dec0643f/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java 
b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
index 044f057..efa8569 100755
--- a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
+++ b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
@@ -12,21 +12,12 @@ import org.apache.struts.crud.service.PersonService;
 /**
  * Acts as a controller to handle actions related to editing a Person.
  * 
- * TODO logging
- * TODO prepareInput 
- * TODO use templates for patterns: X is required... Person... in properties 
file
- * 
- * SUBTASK Fully i18e application: database text data; static text in jsp; 
validation.xml; links for locales.
- * SUBTASK Definitely, improve 'country' implementation
- * SUBTASK add jetty and tomcat plugins to pom.xml
- * SUBTASK look & feel like that of showcase applications; enhance 
visualization (style, css)
- * 
  * @author bruce phillips
  * @author antonio sánchez
  */
 public class PersonAction extends ActionSupport implements Preparable {
 
-private static final Logger LOGGER = 
Logger.getLogger(PersonAction.class.getName());
+private static final Logger LOG = 
Logger.getLogger(PersonAction.class.getName());
 private PersonService personService = new DefaultPersonService();
 private Person person;
 private Person[] persons;
@@ -37,36 +28,37 @@ public class PersonAction extends ActionSupport implements 
Preparable {
 
 @Override
 public void prepare() throws Exception {
-
-LOGGER.info("In prepare method");
 carModelsAvailable = personService.getCarModels();
 sports = personService.getSports();
 countries = personService.getCountries();
 genders = personService.getGenders();
+LOG.info("Prepared support data for Person entity.");
 
 if (person != null && person.getPersonId() != null) {
 person = personService.getPerson(person.getPersonId());
+LOG.info("Preparing actual data for Person: " + person);
 }
 }
 
 /**
  * Get all persons for display in the view.
- * @return success
  */
 public String list() {
 persons = personService.getAllPersons();
+LOG.info("Listing persons");
 return SUCCESS;
 }
 
 /**
  * Save the state of the Person object instance field.
- * @return success
  */
 public String save() {
 if (person.getPersonId() == null) {
 personService.insertPerson(person);
+LOG.info("Created new Person: " + person);
 } else {
 personService.updatePerson(person);
+LOG.info("Updated Person: " + person);
 }
 return SUCCESS;
 }
@@ -74,10 +66,10 @@ public class PersonAction extends ActionSupport implements 
Preparable {
 /**
  * Delete from Person identified by the person
  * instance field's personId value.
- * @return 
  */
 public String delete() {
 personService.deletePerson(person.getPersonId());
+LOG.info("Deleted Person: " + person);
 return SUCCESS;
 }
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/dec0643f/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java 
b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
index 514db8d..9bf1603 100755
--- a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
+++ b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
@@ -2,8 +2,8 @@ package org.apache.struts.crud.dao;
 
 import java.util.ArrayList;
 import java.util.List;
-impo

[03/10] struts-examples git commit: changed logging

2017-07-06 Thread lukaszlenart
changed logging


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

Branch: refs/heads/master
Commit: 37cb87df70cc4e0259641d5359b245d5339c6aa9
Parents: 7724ee3
Author: phillips1021 
Authored: Wed Apr 16 07:58:03 2014 -0500
Committer: phillips1021 
Committed: Wed Apr 16 07:58:03 2014 -0500

--
 crud/src/main/resources/log4j.xml | 25 +
 1 file changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/37cb87df/crud/src/main/resources/log4j.xml
--
diff --git a/crud/src/main/resources/log4j.xml 
b/crud/src/main/resources/log4j.xml
new file mode 100755
index 000..a642174
--- /dev/null
+++ b/crud/src/main/resources/log4j.xml
@@ -0,0 +1,25 @@
+
+
+
+http://jakarta.apache.org/log4j/";>
+
+
+
+   
+
+
+ 
+
+
+
+
+
+  
+   
+ 
+ 
+ 
+  
+
+ 
+



[05/10] struts-examples git commit: Added comments and general code cleanup

2017-07-06 Thread lukaszlenart
Added comments and general code cleanup

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

Branch: refs/heads/master
Commit: 192b912a89a11e63c39fd98ad9b473be98c34ddf
Parents: c436897
Author: phillips1021 
Authored: Fri Apr 18 15:11:18 2014 -0500
Committer: phillips1021 
Committed: Fri Apr 18 15:11:18 2014 -0500

--
 .../apache/struts/crud/action/PersonAction.java | 31 ++--
 .../apache/struts/crud/dao/MemoryPersonDao.java |  6 ++--
 .../struts/crud/dao/MemoryPersonSupportDao.java | 15 --
 .../org/apache/struts/crud/dao/PersonDao.java   |  3 ++
 .../struts/crud/dao/PersonSupportDao.java   |  4 +--
 .../org/apache/struts/crud/model/Country.java   |  2 +-
 .../struts/crud/service/PersonService.java  |  5 
 7 files changed, 42 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/192b912a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java 
b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
index d3fa555..6096be8 100755
--- a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
+++ b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
@@ -1,20 +1,17 @@
 package org.apache.struts.crud.action;
 
 import static com.opensymphony.xwork2.Action.SUCCESS;
-
-//import org.apache.log4j.Logger;
-import org.apache.struts.crud.model.Person;
-import org.apache.struts.crud.model.Country;
-import org.apache.struts.crud.service.PersonService;
-import org.apache.struts.crud.service.DefaultPersonService;
-
 import com.opensymphony.xwork2.ActionSupport;
 import com.opensymphony.xwork2.Preparable;
+import org.apache.log4j.Logger;
+import org.apache.struts.crud.model.Country;
+import org.apache.struts.crud.model.Person;
+import org.apache.struts.crud.service.DefaultPersonService;
+import org.apache.struts.crud.service.PersonService;
 
 /**
  * Acts as a controller to handle actions related to editing a Person.
  * 
- * TODO add comments to all code in the project
  * TODO display country name instead of code
  * TODO logging
  * TODO prepareInput 
@@ -23,7 +20,8 @@ import com.opensymphony.xwork2.Preparable;
  * @author antonio sánchez
  */
 public class PersonAction extends ActionSupport implements Preparable {
-//private static Logger log = 
Logger.getLogger(PersonAction.class.getName());
+
+private static final Logger LOGGER = 
Logger.getLogger(PersonAction.class.getName());
 private PersonService personService = new DefaultPersonService();
 private Person person;
 private Person[] persons;
@@ -34,6 +32,8 @@ public class PersonAction extends ActionSupport implements 
Preparable {
 
 @Override
 public void prepare() throws Exception {
+
+LOGGER.info("In prepare method");
 carModelsAvailable = personService.getCarModels();
 sports = personService.getSports();
 countries = personService.getCountries();
@@ -44,11 +44,19 @@ public class PersonAction extends ActionSupport implements 
Preparable {
 }
 }
 
+/**
+ * Get all persons for display in the view.
+ * @return success
+ */
 public String list() {
 persons = personService.getAllPersons();
 return SUCCESS;
 }
 
+/**
+ * Save the state of the Person object instance field.
+ * @return success
+ */
 public String save() {
 if (person.getPersonId() == null) {
 personService.insertPerson(person);
@@ -58,6 +66,11 @@ public class PersonAction extends ActionSupport implements 
Preparable {
 return SUCCESS;
 }
 
+/**
+ * Delete from Person identified by the person
+ * instance field's personId value.
+ * @return 
+ */
 public String delete() {
 personService.deletePerson(person.getPersonId());
 return SUCCESS;

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/192b912a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java 
b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
index 60a9e7e..5bc2576 100755
--- a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
+++ b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
@@ -5,15 +5,15 @@ import java.util.List;
 import org.apache.struts.crud.model.Pe

[04/10] struts-examples git commit: added log4j DTD

2017-07-06 Thread lukaszlenart
added log4j DTD


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

Branch: refs/heads/master
Commit: c436897a06ae341343c110b688381055fcf2ded9
Parents: 37cb87d
Author: phillips1021 
Authored: Wed Apr 16 08:02:26 2014 -0500
Committer: phillips1021 
Committed: Wed Apr 16 08:02:26 2014 -0500

--
 crud/src/main/resources/log4j.dtd | 227 +
 1 file changed, 227 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c436897a/crud/src/main/resources/log4j.dtd
--
diff --git a/crud/src/main/resources/log4j.dtd 
b/crud/src/main/resources/log4j.dtd
new file mode 100755
index 000..1aabd96
--- /dev/null
+++ b/crud/src/main/resources/log4j.dtd
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+ 
+http://jakarta.apache.org/log4j/"; 
+  threshold(all|trace|debug|info|warn|error|fatal|off|null) 
"null"
+  debug(true|false|null)  "null"
+  reset(true|false) "false"
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+http://jakarta.apache.org/log4j/"; 
+  version(1.1|1.2) "1.2" 
+  includesLocationInfo   (true|false) "true"
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



[07/10] struts-examples git commit: Display country name in persons list; implementation to be enhanced. Also, moved all TODOs and SUBTASKs to PersonAction.java; these are temporary comments.

2017-07-06 Thread lukaszlenart
Display country name in persons list; implementation to be enhanced. Also, 
moved all TODOs and SUBTASKs to PersonAction.java; these are temporary comments.


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

Branch: refs/heads/master
Commit: 78becd730d4acb24189c42c7d542015bd089125c
Parents: 21bcfe6
Author: Antonio Sánchez 
Authored: Fri May 2 17:12:54 2014 +0200
Committer: Antonio Sánchez 
Committed: Fri May 2 17:12:54 2014 +0200

--
 .../apache/struts/crud/action/PersonAction.java | 10 ++-
 .../apache/struts/crud/dao/MemoryPersonDao.java | 12 
 .../struts/crud/dao/MemoryPersonSupportDao.java |  9 --
 .../org/apache/struts/crud/dao/PersonDao.java   |  4 ++-
 .../struts/crud/dao/PersonSupportDao.java   |  4 ++-
 .../org/apache/struts/crud/model/Country.java   | 30 ++--
 .../org/apache/struts/crud/model/Person.java| 16 +--
 .../struts/crud/service/PersonService.java  |  4 ++-
 .../crud/action/PersonAction-validation.xml |  1 -
 .../struts/crud/action/PersonAction.properties  |  4 +--
 crud/src/main/webapp/WEB-INF/jsp/editPerson.jsp |  3 +-
 crud/src/main/webapp/WEB-INF/jsp/persons.jsp| 15 ++
 12 files changed, 72 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/78becd73/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java 
b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
index 6096be8..2b7bd5f 100755
--- a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
+++ b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
@@ -15,7 +15,15 @@ import org.apache.struts.crud.service.PersonService;
  * TODO display country name instead of code
  * TODO logging
  * TODO prepareInput 
- *
+ * TODO I18e messages in validation.xml
+ * TODO use templates for patterns: X is required... Person... in properties 
file
+ * TODO I18e all static text in jsps
+ * 
+ * SUBTASK I18e database text data
+ * SUBTASK Definitely, improve 'country' data implementation
+ * SUBTASK add jetty and tomcat plugins to pom.xml
+ * SUBTASK look & feel like that of showcase applications; enhance 
visualization
+ * 
  * @author bruce phillips
  * @author antonio sánchez
  */

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/78becd73/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java 
b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
index 5bc2576..c1888bd 100755
--- a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
+++ b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
@@ -5,7 +5,9 @@ import java.util.List;
 import org.apache.struts.crud.model.Person;
 
 /**
- *In memory data repository for Person objects.
+ * In memory data repository for Person objects.
+ * 
+ * @author bruce phillips
  * @author antonio sanchez
  */
 public class MemoryPersonDao implements PersonDao {
@@ -14,8 +16,8 @@ public class MemoryPersonDao implements PersonDao {
 
 static {
 persons = new ArrayList<>();
-persons.add(new Person(1, "Bruce", "Phillips", "basketball", "male", 
"US", true, new String[]{"Ford", "Nissan"}, "bphill...@ku.edu", 
"123-456-"));
-persons.add(new Person(2, "Antonio", "Sanchez", "mtb", "male", "ES", 
true, new String[]{"Toyota", "Seat"}, "asanc...@correoe.es", "555-999-"));
+persons.add(new Person(1, "Bruce", "Phillips", "basketball", "male", 
MemoryPersonSupportDao.getCountry("US"), true, new String[]{"Ford", "Nissan"}, 
"bphill...@ku.edu", "123-456-"));
+persons.add(new Person(2, "Antonio", "Sanchez", "mtb", "male", 
MemoryPersonSupportDao.getCountry("ES"), true, new String[]{"Toyota", "Seat"}, 
"asanc...@correo-e.es", "555-999-"));
 }
 
 @Override
@@ -39,7 +41,7 @@ public class MemoryPersonDao implements PersonDao {
 for (int i = 0; i < persons.size(); i++) {
 Person p = persons.get(i);
 if (p.getPersonId().equals(id)) {
-//
person.setDepartment(departmentsMap.get(person.getDepartment().getDepartmentId()));
+
person.setCountry(MemoryPersonSupportDao.getCountry(person.getCountry().getCountryId()));
 persons.set(i, person);
 break;
 }
@@ -54,8 +56,

[01/10] struts-examples git commit: added crud module

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 57df7ba5b -> 6651b1820


added crud module

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

Branch: refs/heads/master
Commit: e0d0c871945be52f09abd17c985c95cb45f0ae08
Parents: b659700
Author: phillips1021 
Authored: Wed Apr 16 07:44:41 2014 -0500
Committer: phillips1021 
Committed: Wed Apr 16 07:44:41 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/e0d0c871/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 5065411..8d4310e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,6 +58,7 @@
 exclude_parameters
 restful2actionmapper
 bean_validation
+crud
 
 
 



[06/10] struts-examples git commit: Added netbeans section in .gitignore

2017-07-06 Thread lukaszlenart
Added netbeans section in .gitignore


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

Branch: refs/heads/master
Commit: 21bcfe6b3d46f772149f39af303384b0b960d165
Parents: 192b912
Author: Antonio Sánchez 
Authored: Thu May 1 14:15:15 2014 +0200
Committer: Antonio Sánchez 
Committed: Thu May 1 14:15:15 2014 +0200

--
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/21bcfe6b/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 313053b..1fcd588 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,9 @@
 .project
 .settings/
 
+# Netbeans
+nb-configuration.xml
+
 # OSX
 .DS_Store
 



[10/10] struts-examples git commit: WW-3993 Merges PR

2017-07-06 Thread lukaszlenart
WW-3993 Merges PR


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

Branch: refs/heads/master
Commit: 6651b18203cb74c24cdbf9993f67726ecde6d9d5
Parents: 57df7ba dec0643
Author: Lukasz Lenart 
Authored: Fri Jul 7 07:33:48 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 07:33:48 2017 +0200

--
 .gitignore  |   3 +
 crud/.gitignore |   1 +
 crud/README.md  |   1 +
 crud/pom.xml|  23 ++
 .../apache/struts/crud/action/PersonAction.java | 104 +
 .../apache/struts/crud/dao/MemoryPersonDao.java |  81 +++
 .../struts/crud/dao/MemoryPersonSupportDao.java |  56 +
 .../org/apache/struts/crud/dao/PersonDao.java   |  24 ++
 .../struts/crud/dao/PersonSupportDao.java   |  23 ++
 .../org/apache/struts/crud/model/Country.java   |  49 
 .../org/apache/struts/crud/model/Person.java| 142 
 .../crud/service/DefaultPersonService.java  |  71 ++
 .../struts/crud/service/PersonService.java  |  32 +++
 crud/src/main/resources/log4j.dtd   | 227 +++
 crud/src/main/resources/log4j.xml   |  27 +++
 .../crud/action/PersonAction-validation.xml |  35 +++
 .../struts/crud/action/PersonAction.properties  |  28 +++
 crud/src/main/resources/struts.xml  |  34 +++
 crud/src/main/webapp/META-INF/MANIFEST.MF   |   3 +
 crud/src/main/webapp/META-INF/context.xml   |   2 +
 crud/src/main/webapp/WEB-INF/jsp/editPerson.jsp |  40 
 crud/src/main/webapp/WEB-INF/jsp/persons.jsp|  62 +
 crud/src/main/webapp/WEB-INF/web.xml|  21 ++
 crud/src/main/webapp/css/main.css   |  56 +
 crud/src/main/webapp/index.jsp  |  16 ++
 pom.xml |   1 +
 26 files changed, 1162 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/6651b182/.gitignore
--

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/6651b182/pom.xml
--
diff --cc pom.xml
index a982693,8d4310e..eeeb117
--- a/pom.xml
+++ b/pom.xml
@@@ -12,78 -12,57 +12,79 @@@
  go with the Struts 2 Getting Started series of tutorials.
  
  
 -
 +
 +
 +The Apache Software License, Version 2.0
 +http://www.apache.org/licenses/LICENSE-2.0.txt
 +repo
 +
 +
 +
 +
 +
 +Apache Software Foundation
 +http://www.apache.org
 +
 +
 +
 +scm:git:git://git.apache.org/struts.git
 +
scm:git:https://git-wip-us.apache.org/repos/asf/struts-examples.git
 +http://git.apache.org/struts-examples.git
 +HEAD
 +
 +
 +
 +JIRA
 +https://issues.apache.org/jira/browse/WW
 +
  
 +
  UTF-8
 -
 -2.3.16.1
 -
 -1.2.17
 -
 +2.5.12
 +2.8.2
  
  
 -
 -
 -bphillips
 -Bruce Phillips
 -bphill...@ku.edu
 -Apache Struts 2 Committer
 -
 -Committer
 -
 -
 -
 -
  
 -basic_struts
 -helloworld
 -using_tags
 -coding_actions
 -form_processing
 -form_validation
 -message_resource
 -exception_handling
 -debugging_struts
 -form_tags
 -form_xml_validation
 -control_tags
 -wildcard_method_selection
 -themes
 -spring_struts
 +action-chaining
  annotations
 +basic-struts
 +bean-validation
 +blank
 +coding-actions
 +control-tags
++crud
 +debugging-struts
 +exception-handling
 +exclude-parameters
 +file-upload
 +form-processing
 +form-tags
 +form-validation
 +form-xml-validation
 +helloworld
 +http-session
  interceptors
 -unit_testing
 -http_session
 -preparable_interface
 -exclude_parameters
 +json
 +mailreader
 +message-resource
 +message-store
 +portlet
 +preparable-interface
  restful2actionmapper
 -bean_validation
 -crud
 +rest-angular
 +spring-struts
 +text-provider
 +tiles
 +themes
 +themes-override
 +type-conversion
 +

[08/10] struts-examples git commit: Fixed invalid update been saved: using clones of Person in MemoryDay.

2017-07-06 Thread lukaszlenart
Fixed invalid update been saved: using clones of Person in MemoryDay.


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

Branch: refs/heads/master
Commit: 1ce1a4f5f938d6d6324fa712f010c309ba5fb248
Parents: 78becd7
Author: Antonio Sánchez 
Authored: Sun May 4 01:03:00 2014 +0200
Committer: Antonio Sánchez 
Committed: Sun May 4 01:03:00 2014 +0200

--
 .../java/org/apache/struts/crud/action/PersonAction.java  |  9 +++--
 .../java/org/apache/struts/crud/dao/MemoryPersonDao.java  |  8 +++-
 .../main/java/org/apache/struts/crud/model/Person.java|  9 -
 .../org/apache/struts/crud/action/PersonAction.properties | 10 +-
 4 files changed, 23 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1ce1a4f5/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java 
b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
index 2b7bd5f..044f057 100755
--- a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
+++ b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
@@ -12,17 +12,14 @@ import org.apache.struts.crud.service.PersonService;
 /**
  * Acts as a controller to handle actions related to editing a Person.
  * 
- * TODO display country name instead of code
  * TODO logging
  * TODO prepareInput 
- * TODO I18e messages in validation.xml
  * TODO use templates for patterns: X is required... Person... in properties 
file
- * TODO I18e all static text in jsps
  * 
- * SUBTASK I18e database text data
- * SUBTASK Definitely, improve 'country' data implementation
+ * SUBTASK Fully i18e application: database text data; static text in jsp; 
validation.xml; links for locales.
+ * SUBTASK Definitely, improve 'country' implementation
  * SUBTASK add jetty and tomcat plugins to pom.xml
- * SUBTASK look & feel like that of showcase applications; enhance 
visualization
+ * SUBTASK look & feel like that of showcase applications; enhance 
visualization (style, css)
  * 
  * @author bruce phillips
  * @author antonio sánchez

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1ce1a4f5/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java 
b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
index c1888bd..514db8d 100755
--- a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
+++ b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
@@ -2,6 +2,8 @@ package org.apache.struts.crud.dao;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.apache.struts.crud.model.Person;
 
 /**
@@ -24,7 +26,11 @@ public class MemoryPersonDao implements PersonDao {
 public Person getPerson(Integer id) {
 for (Person p : persons) {
 if (p.getPersonId().equals(id)) {
-return p;
+try {
+return (Person) p.clone();
+} catch (CloneNotSupportedException ex) {
+//TODO LOG 
Logger.getLogger(MemoryPersonDao.class.getName()).log(Level.SEVERE, null, ex);
+}
 }
 }
 return null;

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1ce1a4f5/crud/src/main/java/org/apache/struts/crud/model/Person.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/model/Person.java 
b/crud/src/main/java/org/apache/struts/crud/model/Person.java
index 8dd4a92..7dd2887 100755
--- a/crud/src/main/java/org/apache/struts/crud/model/Person.java
+++ b/crud/src/main/java/org/apache/struts/crud/model/Person.java
@@ -4,11 +4,13 @@ import java.util.Arrays;
 
 /**
  * Models a Person who registers.
+ * 
+ * Person is Cloneable just an implemention technique for in-memory daos.
  *
  * @author bruce phillips
  * @author antonio sanchez
  */
-public class Person {
+public class Person implements Cloneable {
 private Integer personId;
 private String firstName;
 private String lastName;
@@ -118,6 +120,11 @@ public class Person {
 public String getPhoneNumber() {
 return phoneNumber;
 }
+
+@Override
+public Object clone() throws CloneNotSupportedException {
+return super.clo

[02/10] struts-examples git commit: initial commit of Struts 2 CRUD example

2017-07-06 Thread lukaszlenart
initial commit of Struts 2 CRUD example

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

Branch: refs/heads/master
Commit: 7724ee348a23d5984b954e1d29d9aec908a8c0dd
Parents: e0d0c87
Author: phillips1021 
Authored: Wed Apr 16 07:54:14 2014 -0500
Committer: phillips1021 
Committed: Wed Apr 16 07:54:14 2014 -0500

--
 crud/.gitignore |   1 +
 crud/README.md  |   1 +
 crud/pom.xml|  23 
 .../apache/struts/crud/action/PersonAction.java |  94 +
 .../apache/struts/crud/dao/MemoryPersonDao.java |  72 ++
 .../struts/crud/dao/MemoryPersonSupportDao.java |  56 
 .../org/apache/struts/crud/dao/PersonDao.java   |  19 +++
 .../struts/crud/dao/PersonSupportDao.java   |  21 +++
 .../org/apache/struts/crud/model/Country.java   |  37 +
 .../org/apache/struts/crud/model/Person.java| 135 +++
 .../crud/service/DefaultPersonService.java  |  71 ++
 .../struts/crud/service/PersonService.java  |  25 
 .../crud/action/PersonAction-validation.xml |  36 +
 .../struts/crud/action/PersonAction.properties  |  30 +
 crud/src/main/resources/struts.xml  |  34 +
 crud/src/main/webapp/META-INF/MANIFEST.MF   |   3 +
 crud/src/main/webapp/META-INF/context.xml   |   2 +
 crud/src/main/webapp/WEB-INF/jsp/editPerson.jsp |  41 ++
 crud/src/main/webapp/WEB-INF/jsp/persons.jsp|  57 
 crud/src/main/webapp/WEB-INF/web.xml|  21 +++
 crud/src/main/webapp/css/main.css   |  56 
 crud/src/main/webapp/index.jsp  |  16 +++
 22 files changed, 851 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7724ee34/crud/.gitignore
--
diff --git a/crud/.gitignore b/crud/.gitignore
new file mode 100755
index 000..9f97022
--- /dev/null
+++ b/crud/.gitignore
@@ -0,0 +1 @@
+target/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7724ee34/crud/README.md
--
diff --git a/crud/README.md b/crud/README.md
new file mode 100755
index 000..a287bd3
--- /dev/null
+++ b/crud/README.md
@@ -0,0 +1 @@
+Template application for building professional crud applications with Struts2.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7724ee34/crud/pom.xml
--
diff --git a/crud/pom.xml b/crud/pom.xml
new file mode 100755
index 000..2bcf555
--- /dev/null
+++ b/crud/pom.xml
@@ -0,0 +1,23 @@
+
+http://maven.apache.org/POM/4.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+4.0.0
+
+struts.apache.org
+struts2examples
+1.0.0
+
+
+struts_crud
+war
+
+
+Struts CRUD Example
+Example of using Struts 2 for a web app that allows users to 
+Create, Read, Update, and Delete data.
+
+
+crud_struts
+
+

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7724ee34/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java 
b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
new file mode 100755
index 000..d3fa555
--- /dev/null
+++ b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
@@ -0,0 +1,94 @@
+package org.apache.struts.crud.action;
+
+import static com.opensymphony.xwork2.Action.SUCCESS;
+
+//import org.apache.log4j.Logger;
+import org.apache.struts.crud.model.Person;
+import org.apache.struts.crud.model.Country;
+import org.apache.struts.crud.service.PersonService;
+import org.apache.struts.crud.service.DefaultPersonService;
+
+import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.Preparable;
+
+/**
+ * Acts as a controller to handle actions related to editing a Person.
+ * 
+ * TODO add comments to all code in the project
+ * TODO display country name instead of code
+ * TODO logging
+ * TODO prepareInput 
+ *
+ * @author bruce phillips
+ * @author antonio sánchez
+ */
+public class PersonAction extends ActionSupport implements Preparable {
+//private static Logger log = 
Logger.getLogger(PersonA

[2/3] struts-examples git commit: Drops unused definition

2017-07-06 Thread lukaszlenart
Drops unused definition


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

Branch: refs/heads/master
Commit: 3ed76060a64240e1404d109d3ea6f44412fa8c57
Parents: 634e492
Author: Lukasz Lenart 
Authored: Fri Jul 7 07:41:18 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 07:41:18 2017 +0200

--
 action-chaining/pom.xml | 9 -
 1 file changed, 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/3ed76060/action-chaining/pom.xml
--
diff --git a/action-chaining/pom.xml b/action-chaining/pom.xml
index b5d17df..58a7f8f 100644
--- a/action-chaining/pom.xml
+++ b/action-chaining/pom.xml
@@ -20,15 +20,6 @@
 
 
 
-maven-compiler-plugin
-3.3
-
-UTF-8
-1.7
-1.7
-
-
-
 org.mortbay.jetty
 jetty-maven-plugin
 8.1.16.v20140903



[1/3] struts-examples git commit: Fixes post merge issues

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 6651b1820 -> 9f8e55972


Fixes post merge issues


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

Branch: refs/heads/master
Commit: 634e49228ea3ff8018e03e73fa6e3a3f2595db5e
Parents: 6651b18
Author: Lukasz Lenart 
Authored: Fri Jul 7 07:41:04 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 07:41:04 2017 +0200

--
 crud/pom.xml| 37 
 .../apache/struts/crud/action/PersonAction.java |  6 ++--
 .../apache/struts/crud/dao/MemoryPersonDao.java |  7 ++--
 3 files changed, 37 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/634e4922/crud/pom.xml
--
diff --git a/crud/pom.xml b/crud/pom.xml
index 2bcf555..6e1d9ad 100755
--- a/crud/pom.xml
+++ b/crud/pom.xml
@@ -3,21 +3,44 @@
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 4.0.0
+
 
-struts.apache.org
-struts2examples
+org.apache.struts
+struts-examples
 1.0.0
 
 
-struts_crud
+crud
+1.0-SNAPSHOT
 war
+CRUD Example
 
+
+Example of using Struts 2 for a web app that allows users to
+Create, Read, Update, and Delete data.
+
 
-Struts CRUD Example
-Example of using Struts 2 for a web app that allows users to 
-Create, Read, Update, and Delete data.
+
+UTF-8
+
 
 
-crud_struts
+
+
+org.mortbay.jetty
+jetty-maven-plugin
+8.1.16.v20140903
+
+CTRL+C
+8999
+10
+
${basedir}/src/main/webapp/
+
+
${basedir}/src/main/webapp/WEB-INF/web.xml
+
+
+
+
 
+
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/634e4922/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java 
b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
index efa8569..6a85cea 100755
--- a/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
+++ b/crud/src/main/java/org/apache/struts/crud/action/PersonAction.java
@@ -1,9 +1,9 @@
 package org.apache.struts.crud.action;
 
-import static com.opensymphony.xwork2.Action.SUCCESS;
 import com.opensymphony.xwork2.ActionSupport;
 import com.opensymphony.xwork2.Preparable;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.struts.crud.model.Country;
 import org.apache.struts.crud.model.Person;
 import org.apache.struts.crud.service.DefaultPersonService;
@@ -17,7 +17,7 @@ import org.apache.struts.crud.service.PersonService;
  */
 public class PersonAction extends ActionSupport implements Preparable {
 
-private static final Logger LOG = 
Logger.getLogger(PersonAction.class.getName());
+private static final Logger LOG = 
LogManager.getLogger(PersonAction.class.getName());
 private PersonService personService = new DefaultPersonService();
 private Person person;
 private Person[] persons;

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/634e4922/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
--
diff --git a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java 
b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
index 9bf1603..6b58df3 100755
--- a/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
+++ b/crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java
@@ -2,8 +2,9 @@ package org.apache.struts.crud.dao;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.log4j.Logger;
-import org.apache.struts.crud.action.PersonAction;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.struts.crud.model.Person;
 
 /**
@@ -13,7 +14,7 @@ import org.apache.struts.crud.model.Person;
  * @author antonio sanchez
  */
 public class MemoryPersonDao implements PersonDao {
-private static final Logger LOG 

[3/3] struts-examples git commit: Uses proper filter definition

2017-07-06 Thread lukaszlenart
Uses proper filter definition


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

Branch: refs/heads/master
Commit: 9f8e55972bcaf8e90d84f9167df4be17a77420ea
Parents: 3ed7606
Author: Lukasz Lenart 
Authored: Fri Jul 7 07:41:28 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 07:41:28 2017 +0200

--
 crud/src/main/webapp/WEB-INF/web.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/9f8e5597/crud/src/main/webapp/WEB-INF/web.xml
--
diff --git a/crud/src/main/webapp/WEB-INF/web.xml 
b/crud/src/main/webapp/WEB-INF/web.xml
index d0864b2..65cd4a2 100755
--- a/crud/src/main/webapp/WEB-INF/web.xml
+++ b/crud/src/main/webapp/WEB-INF/web.xml
@@ -10,7 +10,7 @@
 
 
 struts2
-
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
+
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
 
 
 



[7/7] struts-examples git commit: Merge branch 'shiro'

2017-07-06 Thread lukaszlenart
Merge branch 'shiro'


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

Branch: refs/heads/master
Commit: dece3f9550686539de50157a3b79a7ea8aa1f57f
Parents: 9f8e559 ee5a3e3
Author: Lukasz Lenart 
Authored: Fri Jul 7 08:13:01 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 08:13:01 2017 +0200

--
 pom.xml |   1 +
 shiro-basic/pom.xml |  67 +++
 .../shiro/example/action/LoginAction.java   | 116 +++
 .../shiro/example/action/LogoutAction.java  |  18 +++
 .../shiro/example/action/ShiroBaseAction.java   |  28 +
 .../shiro/example/action/WelcomeAction.java | 107 +
 .../interceptor/ShiroUserInterceptor.java   |  57 +
 shiro-basic/src/main/resources/log4j2.xml   |  25 
 shiro-basic/src/main/resources/shiro.ini|  25 
 shiro-basic/src/main/resources/struts.xml   |  37 ++
 shiro-basic/src/main/webapp/WEB-INF/web.xml |  27 +
 shiro-basic/src/main/webapp/css/main.css|  56 +
 shiro-basic/src/main/webapp/index.jsp   |   1 +
 shiro-basic/src/main/webapp/pages/login.jsp |  27 +
 shiro-basic/src/main/webapp/pages/welcome.jsp   |  39 +++
 15 files changed, 631 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/dece3f95/pom.xml
--



[4/7] struts-examples git commit: Modifications for integrating with 'struts-examples' parent pom.xml file

2017-07-06 Thread lukaszlenart
Modifications for integrating with 'struts-examples' parent pom.xml 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/d5420bb2
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/d5420bb2
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/d5420bb2

Branch: refs/heads/master
Commit: d5420bb2e729d6fa33a119dbbb7cd19d1c7b8e1b
Parents: ade34f2
Author: tkofford 
Authored: Thu Jul 6 08:36:58 2017 -0500
Committer: tkofford 
Committed: Thu Jul 6 08:36:58 2017 -0500

--
 shiro-basic/pom.xml | 40 ++--
 1 file changed, 14 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d5420bb2/shiro-basic/pom.xml
--
diff --git a/shiro-basic/pom.xml b/shiro-basic/pom.xml
index 3dfe907..3b716d1 100644
--- a/shiro-basic/pom.xml
+++ b/shiro-basic/pom.xml
@@ -1,22 +1,27 @@
 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";>
 4.0.0
-struts2shiro
-struts2shiro
-1.0.0
-war
+
+org.apache.struts
+struts-examples
+1.0.0
+
+
+shiro-basic
+
+Struts2 with Basic Shiro Security Integration
 
+war
+
 
-UTF-8
 1.3.2
-2.5.10.1
 
 
 
 
 org.apache.struts
 struts2-core
-${struts.version}
+${struts2.version}
 
 
 
@@ -33,12 +38,12 @@
 
 org.apache.logging.log4j
 log4j-api
-2.8.2
+${log4j2.version}
 
 
 org.apache.logging.log4j
 log4j-core
-2.8.2
+${log4j2.version}
 
 
 
@@ -57,23 +62,6 @@
 
 
 
-
-
-maven-compiler-plugin
-3.1
-
-1.8
-1.8
-
-
-
-maven-war-plugin
-2.4
-
-false
-
-
-
 ${project.artifactId}
 
 
\ No newline at end of file



[5/7] struts-examples git commit: Modifying package name to be consistent with other projects in the 'struts-examples' parent project

2017-07-06 Thread lukaszlenart
Modifying package name to be consistent with other projects in the 
'struts-examples' parent project


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

Branch: refs/heads/master
Commit: a6ad31df3956cc4b30eb8635b76cee9a54725fab
Parents: d5420bb
Author: tkofford 
Authored: Thu Jul 6 08:58:26 2017 -0500
Committer: tkofford 
Committed: Thu Jul 6 08:58:26 2017 -0500

--
 .../struts2shiro/action/LoginAction.java| 113 ---
 .../struts2shiro/action/LogoutAction.java   |  18 ---
 .../struts2shiro/action/ShiroBaseAction.java|  34 --
 .../struts2shiro/action/WelcomeAction.java  | 101 -
 .../interceptor/ShiroUserInterceptor.java   |  64 ---
 .../struts2shiro/action/LoginAction.java| 113 +++
 .../struts2shiro/action/LogoutAction.java   |  18 +++
 .../struts2shiro/action/ShiroBaseAction.java|  28 +
 .../struts2shiro/action/WelcomeAction.java  | 101 +
 .../interceptor/ShiroUserInterceptor.java   |  57 ++
 shiro-basic/src/main/resources/struts.xml   |   8 +-
 11 files changed, 321 insertions(+), 334 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/a6ad31df/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java
--
diff --git 
a/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java 
b/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java
deleted file mode 100644
index fbfceb3..000
--- a/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package example.struts2shiro.action;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.IncorrectCredentialsException;
-import org.apache.shiro.authc.LockedAccountException;
-import org.apache.shiro.authc.UnknownAccountException;
-import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.session.Session;
-import org.apache.shiro.subject.Subject;
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.Preparable;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-public class LoginAction extends ActionSupport implements Preparable
-{
-
-private static final long serialVersionUID = 1L;
-private static final transient Logger log = 
LogManager.getLogger(LoginAction.class);
-
-private String username;
-private String password;
-private Subject shiroUser;
-
-@Override
-public void prepare() throws Exception 
-{
-shiroUser = SecurityUtils.getSubject();
-}
-
-@Override
-public String execute()
-{
-String result = INPUT;
-
-// Do some stuff with a Session
-Session session = shiroUser.getSession();
-session.setAttribute("MyUsername", username);
-log.info("Saving 'username' value to session [" + username + "]");
-
-// let's login the current user so we can check against roles and 
permissions:
-if (shiroUser != null && ! shiroUser.isAuthenticated()) 
-{
-UsernamePasswordToken token = new UsernamePasswordToken(username, 
password);
-token.setRememberMe(true);
-try 
-{
-shiroUser.login(token);
-result = SUCCESS;
-} 
-catch (UnknownAccountException uae) 
-{
-addActionError("There is no user with username of '" + 
token.getPrincipal() + "'");
-log.error(uae.getMessage());
-} 
-catch (IncorrectCredentialsException ice) 
-{
-addActionError("Password for account '" + token.getPrincipal() 
+ "' was incorrect!");
-log.error(ice.getMessage());
-} 
-catch (LockedAccountException lae) 
-{
-addActionError("The account for username '" + 
token.getPrincipal() + "' is locked.  " +
-"Please contact your administrator to unlock it.");
-log.error(lae.getMessage());
-}
-// ... catch more exceptions here (maybe custom ones specific to 
your application?
-catch (AuthenticationException ae) 
-{
-addActionError("An authentication exception has occurred 
trying to login user: " + token.getPrincipal());
-log.err

[6/7] struts-examples git commit: Reorganizing package directories

2017-07-06 Thread lukaszlenart
Reorganizing package directories


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

Branch: refs/heads/master
Commit: ee5a3e3abe8f6cb56714789958573a882e83aa7b
Parents: a6ad31d
Author: tkofford 
Authored: Thu Jul 6 10:31:57 2017 -0500
Committer: tkofford 
Committed: Thu Jul 6 10:31:57 2017 -0500

--
 .../shiro/example/action/LoginAction.java   | 116 +++
 .../shiro/example/action/LogoutAction.java  |  18 +++
 .../shiro/example/action/ShiroBaseAction.java   |  28 +
 .../shiro/example/action/WelcomeAction.java | 107 +
 .../interceptor/ShiroUserInterceptor.java   |  57 +
 .../struts2shiro/action/LoginAction.java| 113 --
 .../struts2shiro/action/LogoutAction.java   |  18 ---
 .../struts2shiro/action/ShiroBaseAction.java|  28 -
 .../struts2shiro/action/WelcomeAction.java  | 101 
 .../interceptor/ShiroUserInterceptor.java   |  57 -
 10 files changed, 326 insertions(+), 317 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/ee5a3e3a/shiro-basic/src/main/java/org/apache/struts2/shiro/example/action/LoginAction.java
--
diff --git 
a/shiro-basic/src/main/java/org/apache/struts2/shiro/example/action/LoginAction.java
 
b/shiro-basic/src/main/java/org/apache/struts2/shiro/example/action/LoginAction.java
new file mode 100644
index 000..88f7ba5
--- /dev/null
+++ 
b/shiro-basic/src/main/java/org/apache/struts2/shiro/example/action/LoginAction.java
@@ -0,0 +1,116 @@
+package org.apache.struts2.shiro.example.action;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.IncorrectCredentialsException;
+import org.apache.shiro.authc.LockedAccountException;
+import org.apache.shiro.authc.UnknownAccountException;
+import org.apache.shiro.authc.UsernamePasswordToken;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.Subject;
+import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.Preparable;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class LoginAction extends ActionSupport implements Preparable
+{
+
+private static final long serialVersionUID = 1L;
+private static final transient Logger log = 
LogManager.getLogger(LoginAction.class);
+
+private String username;
+private String password;
+private transient Subject shiroUser;
+
+@Override
+public void prepare() throws Exception 
+{
+shiroUser = SecurityUtils.getSubject();
+}
+
+@Override
+public String execute()
+{
+String result = INPUT;
+
+if (shiroUser != null)
+{
+// Do some stuff with a Session
+Session session = shiroUser.getSession();
+session.setAttribute("MyUsername", username);
+log.info("Saving 'username' value to session [" + username + "]");
+
+// let's login the current user so we can check against roles and 
permissions:
+if (! shiroUser.isAuthenticated()) 
+{
+UsernamePasswordToken token = new 
UsernamePasswordToken(username, password);
+token.setRememberMe(true);
+try 
+{
+shiroUser.login(token);
+result = SUCCESS;
+} 
+catch (UnknownAccountException uae) 
+{
+addActionError("There is no user with username of '" + 
token.getPrincipal() + "'");
+log.error(uae.getMessage());
+} 
+catch (IncorrectCredentialsException ice) 
+{
+addActionError("Password for account '" + 
token.getPrincipal() + "' was incorrect!");
+log.error(ice.getMessage());
+} 
+catch (LockedAccountException lae) 
+{
+addActionError("The account for username '" + 
token.getPrincipal() + "' is locked.  " +
+"Please contact your administrator to unlock it.");
+log.error(lae.getMessage());
+}
+// ... catch more exceptions here (maybe custom ones specific 
to your application?
+catch (AuthenticationException ae) 
+{
+addActionError("An authentication excepti

[3/7] struts-examples git commit: Adding project 'shiro-basic'

2017-07-06 Thread lukaszlenart
Adding project 'shiro-basic'


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

Branch: refs/heads/master
Commit: ade34f2877316df689321db452deaae4e4320ccc
Parents: 35a4fef
Author: tkofford 
Authored: Thu Jul 6 08:21:37 2017 -0500
Committer: tkofford 
Committed: Thu Jul 6 08:21:37 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/ade34f28/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 16778d5..0a43b58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,7 @@
 preparable-interface
 restful2actionmapper
 rest-angular
+shiro-basic
 spring-struts
 text-provider
 tiles



[1/7] struts-examples git commit: Initial commit

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 9f8e55972 -> dece3f955


Initial commit


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

Branch: refs/heads/master
Commit: 876600a345cd34f4a52634ebc8b1fe0769585eb3
Parents: d07e954
Author: tkofford 
Authored: Thu Jul 6 07:59:44 2017 -0500
Committer: tkofford 
Committed: Thu Jul 6 07:59:44 2017 -0500

--
 shiro-basic/pom.xml |  79 +
 .../struts2shiro/action/LoginAction.java| 113 +++
 .../struts2shiro/action/LogoutAction.java   |  18 +++
 .../struts2shiro/action/ShiroBaseAction.java|  34 ++
 .../struts2shiro/action/WelcomeAction.java  | 101 +
 .../interceptor/ShiroUserInterceptor.java   |  64 +++
 shiro-basic/src/main/resources/log4j2.xml   |  25 
 shiro-basic/src/main/resources/shiro.ini|  25 
 shiro-basic/src/main/resources/struts.xml   |  37 ++
 shiro-basic/src/main/webapp/WEB-INF/web.xml |  27 +
 shiro-basic/src/main/webapp/css/main.css|  56 +
 shiro-basic/src/main/webapp/index.jsp   |   1 +
 shiro-basic/src/main/webapp/pages/login.jsp |  27 +
 shiro-basic/src/main/webapp/pages/welcome.jsp   |  39 +++
 14 files changed, 646 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/876600a3/shiro-basic/pom.xml
--
diff --git a/shiro-basic/pom.xml b/shiro-basic/pom.xml
new file mode 100644
index 000..3dfe907
--- /dev/null
+++ b/shiro-basic/pom.xml
@@ -0,0 +1,79 @@
+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";>
+4.0.0
+struts2shiro
+struts2shiro
+1.0.0
+war
+
+
+UTF-8
+1.3.2
+2.5.10.1
+
+
+
+
+org.apache.struts
+struts2-core
+${struts.version}
+
+
+
+org.apache.shiro
+shiro-core
+${shiro.version}
+
+
+org.apache.shiro
+shiro-web
+${shiro.version}
+
+
+
+org.apache.logging.log4j
+log4j-api
+2.8.2
+
+
+org.apache.logging.log4j
+log4j-core
+2.8.2
+
+
+
+javax.servlet
+servlet-api
+2.4
+provided
+
+
+javax.servlet.jsp
+jsp-api
+2.1
+provided
+
+
+
+
+
+
+
+maven-compiler-plugin
+3.1
+
+1.8
+1.8
+
+
+
+maven-war-plugin
+2.4
+
+false
+
+
+
+${project.artifactId}
+
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/876600a3/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java
--
diff --git 
a/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java 
b/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java
new file mode 100644
index 000..fbfceb3
--- /dev/null
+++ b/shiro-basic/src/main/java/example/struts2shiro/action/LoginAction.java
@@ -0,0 +1,113 @@
+package example.struts2shiro.action;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.IncorrectCredentialsException;
+import org.apache.shiro.authc.LockedAccountException;
+import org.apache.shiro.authc.UnknownAccountException;
+import org.apache.shiro.authc.UsernamePasswordToken;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.Subject;
+import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.Preparable;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class LoginAction extends ActionSupport implements Preparable
+{
+
+private static final long serialVersionUID = 1L;
+private static final transient Logger log = 
LogManager.getLogger(LoginAction.class);
+
+private String username;
+private String password;
+private Sub

[2/7] struts-examples git commit: Cleaning up CR/LF and tabs

2017-07-06 Thread lukaszlenart
Cleaning up CR/LF and tabs


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

Branch: refs/heads/master
Commit: 35a4fef0e4eff60bb2b5c2ccde231fe52ad79610
Parents: 876600a
Author: tkofford 
Authored: Thu Jul 6 08:03:22 2017 -0500
Committer: tkofford 
Committed: Thu Jul 6 08:03:22 2017 -0500

--
 shiro-basic/src/main/webapp/pages/login.jsp   | 20 ++--
 shiro-basic/src/main/webapp/pages/welcome.jsp | 16 
 2 files changed, 18 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/35a4fef0/shiro-basic/src/main/webapp/pages/login.jsp
--
diff --git a/shiro-basic/src/main/webapp/pages/login.jsp 
b/shiro-basic/src/main/webapp/pages/login.jsp
index 8d62758..a8941a1 100644
--- a/shiro-basic/src/main/webapp/pages/login.jsp
+++ b/shiro-basic/src/main/webapp/pages/login.jsp
@@ -5,8 +5,8 @@
 <%@ taglib uri="/struts-tags" prefix="s"%>
 
 
-   
-   Login Page
+
+Login Page
 
 
 
@@ -14,14 +14,14 @@
 
 Welcome User, please login below
 
-   
-   
-   
-   
-  
- 
-  
-   
+
+
+
+
+   
+  
+   
+
 
 
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/35a4fef0/shiro-basic/src/main/webapp/pages/welcome.jsp
--
diff --git a/shiro-basic/src/main/webapp/pages/welcome.jsp 
b/shiro-basic/src/main/webapp/pages/welcome.jsp
index 813d3ab..600971d 100644
--- a/shiro-basic/src/main/webapp/pages/welcome.jsp
+++ b/shiro-basic/src/main/webapp/pages/welcome.jsp
@@ -5,9 +5,9 @@
 http://www.w3.org/TR/html4/loose.dtd";>
 
 
-   
-   Welcome Page
-   
+
+Welcome Page
+
 
 
 
@@ -21,10 +21,10 @@
 
 Permissions:
 
-   You may use a 
lightsaber ring.  Use it wisely.
-   Sorry, 
lightsaber rings are for schwartz masters only.
-   You are 
permitted to 'drive' the winnebago with license plate (id) 'eagle5'.Here 
are the keys - have fun!
-   Sorry, you 
aren't allowed to drive the 'eagle5' winnebago!
+You may use a 
lightsaber ring.  Use it wisely.
+Sorry, lightsaber 
rings are for schwartz masters only.
+You are 
permitted to 'drive' the winnebago with license plate (id) 'eagle5'.Here 
are the keys - have fun!
+Sorry, you 
aren't allowed to drive the 'eagle5' winnebago!
 
   
   
@@ -33,7 +33,7 @@
 
   
   
-   
+
   
 
 
\ No newline at end of file



struts-examples git commit: Fixes logging layer

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master dece3f955 -> f47c4694c


Fixes logging layer


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

Branch: refs/heads/master
Commit: f47c4694c7f23e0cbe630b4e4600adf33eeecbd8
Parents: dece3f9
Author: Lukasz Lenart 
Authored: Fri Jul 7 08:20:47 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 08:20:47 2017 +0200

--
 crud/src/main/resources/log4j.dtd  | 227 
 crud/src/main/resources/log4j.xml  |  27 
 crud/src/main/resources/log4j2.xml |  16 +++
 3 files changed, 16 insertions(+), 254 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/f47c4694/crud/src/main/resources/log4j.dtd
--
diff --git a/crud/src/main/resources/log4j.dtd 
b/crud/src/main/resources/log4j.dtd
deleted file mode 100755
index 1aabd96..000
--- a/crud/src/main/resources/log4j.dtd
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 
-
- 
-http://jakarta.apache.org/log4j/"; 
-  threshold(all|trace|debug|info|warn|error|fatal|off|null) 
"null"
-  debug(true|false|null)  "null"
-  reset(true|false) "false"
->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-http://jakarta.apache.org/log4j/"; 
-  version(1.1|1.2) "1.2" 
-  includesLocationInfo   (true|false) "true"
->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/f47c4694/crud/src/main/resources/log4j.xml
--
diff --git a/crud/src/main/resources/log4j.xml 
b/crud/src/main/resources/log4j.xml
deleted file mode 100755
index 6645aae..000
--- a/crud/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-http://jakarta.apache.org/log4j/";>
-
-
-
-   
-
-
- 
-
-
-
-
-
-
-
-  
-   
- 
- 
- 
-  
-
- 
-

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/f47c4694/crud/src/main/resources/log4j2.xml
--
diff --git a/crud/src/main/resources/log4j2.xml 
b/crud/src/main/resources/log4j2.xml
new file mode 100755
index 000..7c997ba
--- /dev/null
+++ b/crud/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file



struts-examples git commit: Converts readme to MD

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master f47c4694c -> 22c3eb32d


Converts readme to MD


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

Branch: refs/heads/master
Commit: 22c3eb32dd292b1984773bd9883d60ec3f42644a
Parents: f47c469
Author: Lukasz Lenart 
Authored: Fri Jul 7 08:46:34 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 08:46:34 2017 +0200

--
 README.md  | 14 ++
 ReadMe.txt | 14 --
 2 files changed, 14 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/22c3eb32/README.md
--
diff --git a/README.md b/README.md
new file mode 100644
index 000..abecaef
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+# Struts Examples
+
+This Maven multi-module project contains all the Struts 2 example applications 
that are part of the Getting Started Struts 2 tutorials at 
http://struts.apache.org.
+
+To build all the example applications run the Maven command:
+```
+mvn -e clean package
+```
+
+in the project's root folder.  Maven will the build each module and create a 
.war file in the target sub-folder of each module.
+
+You can then copy the .war files to your Servlet container (e.g. Tomcat, 
Jetty, GlassFish, etc).
+
+There is a README file in each module with instructions  and the URL to view 
that application.

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/22c3eb32/ReadMe.txt
--
diff --git a/ReadMe.txt b/ReadMe.txt
deleted file mode 100644
index f63a7b6..000
--- a/ReadMe.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-This Maven multi-module project contains all the Struts 2
-example applications that are part of the Getting Started
-Struts 2 tutorials at http://struts.apache.org.
-
-To build all the example applications run the Maven command:
-mvn -e clean package in the project's root folder.  Maven 
-will the build each module and create a .war file in the
-target sub-folder of each module.
-
-You can then copy the .war files to your Servlet container
-(e.g. Tomcat, Jetty, GlassFish, etc).
-
-There is a ReadMe.txt file in each module with instructions 
-and the URL to view that application.



struts-examples git commit: Adds info about builds

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 22c3eb32d -> 0fc2556af


Adds info about builds


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

Branch: refs/heads/master
Commit: 0fc2556afcbd313cb929ee28ed52c3cabd69342b
Parents: 22c3eb3
Author: Lukasz Lenart 
Authored: Fri Jul 7 08:48:37 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 08:48:37 2017 +0200

--
 README.md | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/0fc2556a/README.md
--
diff --git a/README.md b/README.md
index abecaef..2389505 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,10 @@
-# Struts Examples
+Struts Examples
+---
+
+[![Build Status @ 
Jenkins](https://builds.apache.org/buildStatus/icon?job=Struts-examples-JDK8-master)](https://builds.apache.org/view/S-Z/view/Struts/job/Struts-examples-JDK8-master/)
+[![Build Status @ 
Travis](https://travis-ci.org/apache/struts-examples.svg?branch=master)](https://travis-ci.org/apache/struts-examples)
+[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
+
 
 This Maven multi-module project contains all the Struts 2 example applications 
that are part of the Getting Started Struts 2 tutorials at 
http://struts.apache.org.
 



struts-examples git commit: Adds an empty line ... and closes outdated PRs Closes #1 Closes #2 Closes #5 Closes #6 Closes #7 Closes #8

2017-07-06 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 0fc2556af -> 1cdf6f278


Adds an empty line ... and closes outdated PRs
Closes #1
Closes #2
Closes #5
Closes #6
Closes #7
Closes #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/1cdf6f27
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/1cdf6f27
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/1cdf6f27

Branch: refs/heads/master
Commit: 1cdf6f2781a4c1fa4cf4994dcb8a9cbfe11cf290
Parents: 0fc2556
Author: Lukasz Lenart 
Authored: Fri Jul 7 08:56:46 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri Jul 7 08:56:46 2017 +0200

--
 README.md | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/1cdf6f27/README.md
--
diff --git a/README.md b/README.md
index 2389505..0e88698 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ Struts Examples
 This Maven multi-module project contains all the Struts 2 example applications 
that are part of the Getting Started Struts 2 tutorials at 
http://struts.apache.org.
 
 To build all the example applications run the Maven command:
+
 ```
 mvn -e clean package
 ```