struts git commit: Uses proper package

2017-05-12 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master 7fa41f188 -> 5a6c33694


Uses proper package


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

Branch: refs/heads/master
Commit: 5a6c336947e0340ec88639b2e0f5feb3d3516f1d
Parents: 7fa41f1
Author: Lukasz Lenart 
Authored: Fri May 12 09:28:03 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri May 12 09:28:03 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/struts/blob/5a6c3369/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java 
b/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java
index 61a158c..bf528e5 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java
@@ -25,7 +25,7 @@ import com.opensymphony.xwork2.LocaleProvider;
 import com.opensymphony.xwork2.LocaleProviderFactory;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import org.apache.commons.lang.LocaleUtils;
+import org.apache.commons.lang3.LocaleUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.message.ParameterizedMessage;



[5/5] struts-examples git commit: Switches to Log4j2 and uses more convenient name for action

2017-05-12 Thread lukaszlenart
Switches to Log4j2 and uses more convenient name for action


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

Branch: refs/heads/master
Commit: 4b04a0731890583391610dac4bb01673d2972b45
Parents: a0e01e9
Author: Lukasz Lenart 
Authored: Fri May 12 09:07:00 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri May 12 16:47:29 2017 +0200

--
 .../java/org/apache/struts/example/Theme.java   | 56 
 .../org/apache/struts/example/ThemeAction.java  | 56 
 .../example/ThemeDescriptorConverter.java   |  6 +--
 .../java/org/apache/struts/model/Themes.java|  2 +-
 type-conversion/src/main/resources/example.xml  |  2 +-
 5 files changed, 61 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/4b04a073/type-conversion/src/main/java/org/apache/struts/example/Theme.java
--
diff --git a/type-conversion/src/main/java/org/apache/struts/example/Theme.java 
b/type-conversion/src/main/java/org/apache/struts/example/Theme.java
deleted file mode 100644
index 198830f..000
--- a/type-conversion/src/main/java/org/apache/struts/example/Theme.java
+++ /dev/null
@@ -1,56 +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.struts.example;
-
-import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
-import org.apache.struts.model.ThemeDescriptor;
-import org.apache.struts.model.Themes;
-
-import java.util.Map;
-
-public class Theme extends ActionSupport {
-
-private static final Logger LOG = LoggerFactory.getLogger(Theme.class);
-
-private Map themes = Themes.list();
-private ThemeDescriptor selectedTheme = Themes.get("simple");
-
-public String execute() throws Exception {
-return SUCCESS;
-}
-
-public Map getThemes() {
-return themes;
-}
-
-public ThemeDescriptor getSelectedTheme() {
-LOG.info("Existing theme: #0", String.valueOf(selectedTheme));
-return selectedTheme;
-}
-
-public void setSelectedTheme(ThemeDescriptor selectedTheme) {
-LOG.info("Selected theme: #0", String.valueOf(selectedTheme));
-this.selectedTheme = selectedTheme;
-}
-}

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/4b04a073/type-conversion/src/main/java/org/apache/struts/example/ThemeAction.java
--
diff --git 
a/type-conversion/src/main/java/org/apache/struts/example/ThemeAction.java 
b/type-conversion/src/main/java/org/apache/struts/example/ThemeAction.java
new file mode 100644
index 000..c3c9bfe
--- /dev/null
+++ b/type-conversion/src/main/java/org/apache/struts/example/ThemeAction.java
@@ -0,0 +1,56 @@
+/*
+ * $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.struts.example;
+
+import com.opensymphony.xwork2.ActionSupport;
+import org.apache.logging.log4j.LogManag

[4/5] struts-examples git commit: Updates DTD to 2.5

2017-05-12 Thread lukaszlenart
Updates DTD to 2.5


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

Branch: refs/heads/master
Commit: 9dcfa1b91d074f2aae3012f66d9133e22859c3e7
Parents: b028aac
Author: Lukasz Lenart 
Authored: Fri May 12 09:11:51 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri May 12 16:47:29 2017 +0200

--
 type-conversion/src/main/resources/example.xml | 4 ++--
 type-conversion/src/main/resources/struts.xml  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/9dcfa1b9/type-conversion/src/main/resources/example.xml
--
diff --git a/type-conversion/src/main/resources/example.xml 
b/type-conversion/src/main/resources/example.xml
index 0cf1640..924b431 100644
--- a/type-conversion/src/main/resources/example.xml
+++ b/type-conversion/src/main/resources/example.xml
@@ -1,7 +1,7 @@
 
 http://struts.apache.org/dtds/struts-2.3.dtd";>
+"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
+"http://struts.apache.org/dtds/struts-2.5.dtd";>
 

[1/5] struts-examples git commit: Defines an action to show how number conversion works

2017-05-12 Thread lukaszlenart
Repository: struts-examples
Updated Branches:
  refs/heads/master 04d6d8388 -> d07e95420


Defines an action to show how number conversion works


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

Branch: refs/heads/master
Commit: d07e954204fe39a89c40dc58aec86a29ad677c70
Parents: 9dcfa1b
Author: Lukasz Lenart 
Authored: Fri May 12 16:31:11 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri May 12 16:47:29 2017 +0200

--
 .../org/apache/struts/example/NumberAction.java | 49 
 type-conversion/src/main/resources/example.xml  |  4 ++
 .../apache/struts/example/package.properties|  1 +
 .../apache/struts/example/package_de.properties |  1 +
 .../apache/struts/example/package_pl.properties |  1 +
 type-conversion/src/main/resources/struts.xml   |  1 +
 .../src/main/webapp/WEB-INF/example/Number.jsp  | 62 
 .../src/main/webapp/WEB-INF/example/Theme.jsp   |  7 ++-
 8 files changed, 124 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d07e9542/type-conversion/src/main/java/org/apache/struts/example/NumberAction.java
--
diff --git 
a/type-conversion/src/main/java/org/apache/struts/example/NumberAction.java 
b/type-conversion/src/main/java/org/apache/struts/example/NumberAction.java
new file mode 100644
index 000..5b2e0e0
--- /dev/null
+++ b/type-conversion/src/main/java/org/apache/struts/example/NumberAction.java
@@ -0,0 +1,49 @@
+package org.apache.struts.example;
+
+import com.opensymphony.xwork2.ActionSupport;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.math.BigDecimal;
+
+public class NumberAction extends ActionSupport {
+
+private static final Logger LOG = LogManager.getLogger(NumberAction.class);
+
+private BigDecimal bigDecimal = BigDecimal.valueOf(1.01);
+private Double bigDouble = 1.01;
+private double primitiveDouble = 1.01;
+
+@Override
+public String execute() throws Exception {
+LOG.info("BigDecimal value: {}", bigDecimal);
+LOG.info("Double value: {}", bigDouble);
+LOG.info("double value: {}", primitiveDouble);
+
+return INPUT;
+}
+
+public BigDecimal getBigDecimal() {
+return bigDecimal;
+}
+
+public void setBigDecimal(BigDecimal bigDecimal) {
+this.bigDecimal = bigDecimal;
+}
+
+public Double getBigDouble() {
+return bigDouble;
+}
+
+public void setBigDouble(Double bigDouble) {
+this.bigDouble = bigDouble;
+}
+
+public double getPrimitiveDouble() {
+return primitiveDouble;
+}
+
+public void setPrimitiveDouble(double primitiveDouble) {
+this.primitiveDouble = primitiveDouble;
+}
+}

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d07e9542/type-conversion/src/main/resources/example.xml
--
diff --git a/type-conversion/src/main/resources/example.xml 
b/type-conversion/src/main/resources/example.xml
index 924b431..b12b0a3 100644
--- a/type-conversion/src/main/resources/example.xml
+++ b/type-conversion/src/main/resources/example.xml
@@ -15,5 +15,9 @@
 /WEB-INF/example/Theme.jsp
 
 
+
+/WEB-INF/example/Number.jsp
+
+
 
 

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d07e9542/type-conversion/src/main/resources/org/apache/struts/example/package.properties
--
diff --git 
a/type-conversion/src/main/resources/org/apache/struts/example/package.properties
 
b/type-conversion/src/main/resources/org/apache/struts/example/package.properties
new file mode 100644
index 000..581936c
--- /dev/null
+++ 
b/type-conversion/src/main/resources/org/apache/struts/example/package.properties
@@ -0,0 +1 @@
+label=Locale (EN)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/d07e9542/type-conversion/src/main/resources/org/apache/struts/example/package_de.properties
--
diff --git 
a/type-conversion/src/main/resources/org/apache/struts/example/package_de.properties
 
b/type-conversion/src/main/resources/org/apache/struts/example/package_de.properties
new file mode 100644
index 000..7e18611
--- /dev/null
+++ 
b/type-conversion/src/main/resources/org/apache/struts/example/package_de.properties
@@ -0,0 +1 @@
+label=Gebietsschema (DE)
\ No newline at end of file

http://

[2/5] struts-examples git commit: Displays selected object

2017-05-12 Thread lukaszlenart
Displays selected object


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

Branch: refs/heads/master
Commit: b028aacf7600fd75c2e05c05fb37837091d84f77
Parents: 4b04a07
Author: Lukasz Lenart 
Authored: Fri May 12 09:07:11 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri May 12 16:47:29 2017 +0200

--
 type-conversion/src/main/webapp/WEB-INF/example/Theme.jsp | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/b028aacf/type-conversion/src/main/webapp/WEB-INF/example/Theme.jsp
--
diff --git a/type-conversion/src/main/webapp/WEB-INF/example/Theme.jsp 
b/type-conversion/src/main/webapp/WEB-INF/example/Theme.jsp
index b6b59ef..c684819 100644
--- a/type-conversion/src/main/webapp/WEB-INF/example/Theme.jsp
+++ b/type-conversion/src/main/webapp/WEB-INF/example/Theme.jsp
@@ -18,5 +18,9 @@
   
 
 
+
+  
+
+
 
 



[3/5] struts-examples git commit: Uses Log4j2

2017-05-12 Thread lukaszlenart
Uses Log4j2


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

Branch: refs/heads/master
Commit: a0e01e94d557a6efd6bdbbbe2303c5d64914fa9d
Parents: 04d6d83
Author: Lukasz Lenart 
Authored: Fri May 12 09:06:01 2017 +0200
Committer: Lukasz Lenart 
Committed: Fri May 12 16:47:29 2017 +0200

--
 type-conversion/pom.xml | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/a0e01e94/type-conversion/pom.xml
--
diff --git a/type-conversion/pom.xml b/type-conversion/pom.xml
index 7b862ee..72b1b69 100644
--- a/type-conversion/pom.xml
+++ b/type-conversion/pom.xml
@@ -20,6 +20,12 @@
   
 
 
+  org.apache.logging.log4j
+  log4j-core
+  ${log4j2.version}
+
+
+
   javax.servlet
   servlet-api
   2.4