Repository: struts-examples
Updated Branches:
refs/heads/master 2697ee741 -> de96f2c16
Adds simple example how to define custom type conversion
Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/de96f2c1
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/de96f2c1
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/de96f2c1
Branch: refs/heads/master
Commit: de96f2c169a4035da30132b65f103f6668b487cc
Parents: 2697ee7
Author: Lukasz Lenart
Authored: Sat Feb 27 10:59:46 2016 +0100
Committer: Lukasz Lenart
Committed: Sat Feb 27 10:59:46 2016 +0100
--
pom.xml | 1 +
type-conversion/pom.xml | 62
.../java/org/apache/struts/example/Theme.java | 56 ++
.../example/ThemeDescriptorConverter.java | 42 +
.../apache/struts/model/ThemeDescriptor.java| 35 +++
.../java/org/apache/struts/model/Themes.java| 28 +
.../main/resources/Theme-conversion.properties | 1 +
type-conversion/src/main/resources/example.xml | 19 ++
type-conversion/src/main/resources/log4j2.xml | 16 +
type-conversion/src/main/resources/struts.xml | 25
.../main/resources/xwork-conversion.properties | 1 +
.../src/main/webapp/WEB-INF/example/Theme.jsp | 22 +++
type-conversion/src/main/webapp/WEB-INF/web.xml | 23
type-conversion/src/main/webapp/index.html | 10
14 files changed, 341 insertions(+)
--
http://git-wip-us.apache.org/repos/asf/struts-examples/blob/de96f2c1/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 75ada42..61eb7a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,6 +75,7 @@
unit-testing
wildcard-method-selection
message-store
+type-conversion
http://git-wip-us.apache.org/repos/asf/struts-examples/blob/de96f2c1/type-conversion/pom.xml
--
diff --git a/type-conversion/pom.xml b/type-conversion/pom.xml
new file mode 100644
index 000..45f9c93
--- /dev/null
+++ b/type-conversion/pom.xml
@@ -0,0 +1,62 @@
+
+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
+
+
+struts-examples
+org.apache.struts
+1.0.0
+
+
+ type-conversion
+ war
+ Custom Type Convertion
+
+
+UTF-8
+
+
+
+
+
+ org.apache.struts
+ struts2-core
+ ${struts2.version}
+
+
+
+ javax.servlet
+ servlet-api
+ 2.4
+ provided
+
+
+
+ javax.servlet
+ jsp-api
+ 2.0
+ provided
+
+
+
+
+
+
+
+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/de96f2c1/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
new file mode 100644
index 000..198830f
--- /dev/null
+++ b/type-conversion/src/main/java/org/apache/struts/example/Theme.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 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;
+
+i