diff --git a/achetypes/struts2-archetype-dbportlet/README.txt b/achetypes/struts2-archetype-dbportlet/README.txt
new file mode 100644
index 000000000..7c2a6a39c
--- /dev/null
+++ b/achetypes/struts2-archetype-dbportlet/README.txt
@@ -0,0 +1,42 @@
+INFORMATION
+===========
+- This is Struts 2's "Database Portlet" Maven Archetype
+- To be used to create a simple portlet that displays information in a database and can be deployed as a webapp or JSR168 portlet.
+
+
+USAGE
+=====
+
+- change directory to where the portlet template is to be created,
+ for example, a 'projects' directory (which you may need to create):
+
+ cd /home/tmjee/projects
+
+- run the following command to generate the sample portlet template, assuming :-
+ - root java package -> com.myCompany.myPortlet
+
+ - the portlet war name -> myWebApp
+
+
+ mvn archetype:create -DgroupId=com.myCompany.myPortlet \
+ -DartifactId=myWebApp \
+ -DarchetypeGroupId=org.apache.struts \
+ -DarchetypeArtifactId=struts2-archetype-dbportlet \
+ -DarchetypeVersion=2.0.9-SNAPSHOT \
+ -DremoteRepositories=http://people.apache.org/maven-snapshot-repository
+
+- to compile, execute
+ mvn compile
+
+- to run test cases execute
+ mvn test
+
+- to clean execute
+ mvn clean
+
+- to package execute
+ mvn package
+
+- to start it with jetty execute as a servlet
+ mvn jetty:run
+
diff --git a/achetypes/struts2-archetype-dbportlet/pom.xml b/achetypes/struts2-archetype-dbportlet/pom.xml
new file mode 100644
index 000000000..cd84947a8
--- /dev/null
+++ b/achetypes/struts2-archetype-dbportlet/pom.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ org.apache.struts
+ struts2-parent
+ 2.2.0-SNAPSHOT
+
+
+ 4.0.0
+ struts2-archetype-dbportlet
+ 2.2.0-SNAPSHOT
+ Struts 2 Archetypes - Database Portlet
+
+
+ scm:svn:http://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-dbportlet/
+ scm:svn:https://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-dbportlet/
+ http://svn.apache.org/viewcvs.cgi/struts/maven/trunk/struts2-archetype-dbportlet/
+
+
+
+
+ release
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
diff --git a/achetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/archetype.xml b/achetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/archetype.xml
new file mode 100644
index 000000000..a19db5e0a
--- /dev/null
+++ b/achetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/archetype.xml
@@ -0,0 +1,21 @@
+
+
+
+ struts2-archetype-dbblank
+
+ src/main/java/view/IndexAction.java
+ src/main/java/edit/IndexAction.java
+
+
+ src/main/resources/struts.xml
+ src/main/webapp/index.jsp
+ src/main/webapp/WEB-INF/web.xml
+ src/main/webapp/WEB-INF/portlet.xml
+ src/main/webapp/WEB-INF/applicationContext.xml
+ src/main/webapp/WEB-INF/view/index.jsp
+ src/main/webapp/WEB-INF/help/index.jsp
+ src/main/webapp/WEB-INF/edit/index-input.jsp
+ src/main/webapp/WEB-INF/edit/index-success.jsp
+
+
+
diff --git a/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml b/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 000000000..8fda48ad4
--- /dev/null
+++ b/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,123 @@
+
+
+
+ 4.0.0
+ ${groupId}
+ ${artifactId}
+ war
+ ${version}
+ Struts 2 Database Portlet
+ http://www.myComp.com
+ Struts 2 Database Portlet
+
+
+ 2.1.8.1
+
+
+
+
+
+
+ junit
+ junit
+ 3.8.1
+ test
+
+
+
+
+ org.apache.struts
+ struts2-core
+ ${struts2.version}
+
+
+
+ org.apache.struts
+ struts2-portlet-plugin
+ ${struts2.version}
+
+
+
+ org.apache.struts
+ struts2-convention-plugin
+ ${struts2.version}
+
+
+
+ org.apache.struts
+ struts2-spring-plugin
+ ${struts2.version}
+
+
+
+ org.apache.struts
+ struts2-config-browser-plugin
+ ${struts2.version}
+
+
+
+
+ org.springframework
+ spring-jdbc
+ 2.5.6
+
+
+
+
+ hsqldb
+ hsqldb
+ 1.8.0.7
+
+
+
+
+ javax.servlet
+ servlet-api
+ 2.4
+ provided
+
+
+
+ javax.servlet
+ jsp-api
+ 2.0
+ provided
+
+
+
+ portlet-api
+ portlet-api
+ 1.0
+ provided
+
+
+
+
+
+ ${artifactId}
+
+
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+
+
+
+ org.mortbay.jetty
+ maven-jetty-plugin
+ 6.1.21
+
+ 10
+
+
+
+ portlet-api
+ portlet-api
+ 1.0
+
+
+
+
+
+
diff --git a/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java b/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java
new file mode 100644
index 000000000..4a553c100
--- /dev/null
+++ b/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java
@@ -0,0 +1,46 @@
+package ${package}.edit;
+
+import org.apache.struts2.dispatcher.DefaultActionSupport;
+
+/**
+ *
+ */
+public class IndexAction extends DefaultActionSupport {
+ private String pref1;
+ private String pref2;
+ private boolean submit;
+
+ public String execute() {
+
+ if (submit) {
+
+ // Save the preferences somehow
+
+ return SUCCESS;
+ } else {
+
+ // Preform any logic here
+
+ return INPUT;
+ }
+ }
+
+ public void setSubmit(String val) {
+ this.submit = (val != null);
+ }
+
+ public String getPref1() {
+ return pref1;
+ }
+ public String getPref2() {
+ return pref2;
+ }
+
+ public void setPref1(String pref) {
+ this.pref1 = pref;
+ }
+
+ public void setPref2(String pref) {
+ this.pref2 = pref;
+ }
+}
diff --git a/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java b/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java
new file mode 100644
index 000000000..4ab7b32f8
--- /dev/null
+++ b/achetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java
@@ -0,0 +1,51 @@
+package ${package}.view;
+
+import org.apache.struts2.dispatcher.DefaultActionSupport;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+
+import javax.sql.DataSource;
+import java.util.Map;
+import java.util.List;
+
+/**
+ * Loads and displays the contents of a database table
+ */
+public class IndexAction extends DefaultActionSupport {
+
+ private static boolean initialized = false;
+ private DataSource ds;
+ private static List