struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r497309 - in /struts/maven/trunk/struts2-archetype-portlet: ./ src/ src/main/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/src/ src/main/resources/archetype-...
Date Thu, 18 Jan 2007 05:38:27 GMT
Author: mrdon
Date: Wed Jan 17 21:38:25 2007
New Revision: 497309

URL: http://svn.apache.org/viewvc?view=rev&rev=497309
Log:
Initial import of portlet archetype for Struts 2

Added:
    struts/maven/trunk/struts2-archetype-portlet/
    struts/maven/trunk/struts2-archetype-portlet/README.txt
    struts/maven/trunk/struts2-archetype-portlet/pom.xml
    struts/maven/trunk/struts2-archetype-portlet/src/
    struts/maven/trunk/struts2-archetype-portlet/src/main/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/META-INF/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/META-INF/archetype.xml
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/edit/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/view/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/struts.xml
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-input.jsp
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-success.jsp
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/help/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/help/index.jsp
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
    struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/index.jsp

Added: struts/maven/trunk/struts2-archetype-portlet/README.txt
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/README.txt?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/README.txt (added)
+++ struts/maven/trunk/struts2-archetype-portlet/README.txt Wed Jan 17 21:38:25 2007
@@ -0,0 +1,42 @@
+INFORMATION
+===========
+- This is Struts 2's "Portlet" Maven Archetype
+- To be used to create a simple portlet that 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 web app 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-portlet \
+                       -DarchetypeVersion=2.0.3-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
+

Added: struts/maven/trunk/struts2-archetype-portlet/pom.xml
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/pom.xml?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/pom.xml (added)
+++ struts/maven/trunk/struts2-archetype-portlet/pom.xml Wed Jan 17 21:38:25 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project>
+  <parent>
+    <groupId>org.apache.struts</groupId>
+    <artifactId>struts-master</artifactId>
+    <version>3</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>struts2-archetype-portlet</artifactId>
+  <version>2.0.3-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <name>Struts 2 Archetypes - Portlet</name>
+
+    <scm>
+       <connection>scm:svn:http://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-portlet/</connection>
+       <developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-portlet/</developerConnection>
+       <url>http://svn.apache.org/viewcvs.cgi/struts/maven/trunk/struts2-archetype-portlet/</url>
+    </scm>
+
+</project>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/META-INF/archetype.xml
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/META-INF/archetype.xml?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/META-INF/archetype.xml
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/META-INF/archetype.xml
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<archetype>
+  <id>struts2-archetype-blank</id>
+  <sources>
+    <source>src/main/java/view/IndexAction.java</source>
+    <source>src/main/java/edit/IndexAction.java</source>
+  </sources>
+  <resources>
+  	<resource>src/main/resources/struts.xml</resource>
+	<resource>src/main/webapp/WEB-INF/web.xml</resource>
+	<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
+	<resource>src/main/webapp/WEB-INF/view/index.jsp</resource>
+	<resource>src/main/webapp/WEB-INF/help/index.jsp</resource>
+	<resource>src/main/webapp/WEB-INF/edit/index-input.jsp</resource>
+	<resource>src/main/webapp/WEB-INF/edit/index-success.jsp</resource>
+  </resources>
+</archetype>
+

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>${groupId}</groupId>
+	<artifactId>${artifactId}</artifactId>
+	<packaging>war</packaging>
+	<version>${version}</version>
+	<name>Struts 2 Portlet</name>
+	<url>http://www.myComp.com</url>
+	<description>Struts 2 Portlet</description>
+	
+	<dependencies>
+		<!-- Junit -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!--  Struts 2 -->
+		<dependency>
+            <groupId>org.apache.struts</groupId>
+            <artifactId>struts2-core</artifactId>
+            <version>2.0.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.struts</groupId>
+            <artifactId>struts2-codebehind-plugin</artifactId>
+            <version>2.0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.1</version>
+        </dependency>
+
+		<!-- Servlet, Jsp, and Portlet API's -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.0</version>
+			<scope>provided</scope>
+		</dependency>
+        <dependency>
+            <groupId>portlet-api</groupId>
+            <artifactId>portlet-api</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+	
+	<repositories>
+     	<repository>
+            <id>snapshots-maven-codehaus</id>
+            <name>snapshots-maven-codehaus</name>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>always</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <url>http://snapshots.maven.codehaus.org/maven2</url>
+        </repository>
+        <repository>
+            <id>apache</id>
+            <name>apache</name>
+            <layout>legacy</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>always</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <url>http://cvs.apache.org/repository</url>
+        </repository>
+        <repository>
+            <id>apache.snapshots</id>
+            <name>Apache Maven Repository (Snapshots and Test Builds)</name>
+            <url>http://cvs.apache.org/maven-snapshot-repository</url>
+            <releases><enabled>true</enabled></releases>
+            <snapshots><enabled>true</enabled></snapshots>
+        </repository>
+        <repository>
+            <id>opensymphony</id>
+            <name>opensymphony</name>
+            <layout>legacy</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>always</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <url>http://maven.opensymphony.com</url>
+        </repository>
+    </repositories>
+    
+    <build>
+      <finalName>${artifactId}</finalName>
+    	<plugins>
+    		<plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                   <source>1.5</source>
+                   <target>1.5</target>
+                </configuration>
+            </plugin>
+    		<plugin>
+    			<groupId>org.mortbay.jetty</groupId>
+    			<artifactId>maven-jetty-plugin</artifactId>
+    			<version>6.1.1</version>
+    			<configuration>
+    				<scanIntervalSeconds>10</scanIntervalSeconds>
+    			</configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>portlet-api</groupId>
+                        <artifactId>portlet-api</artifactId>
+                        <version>1.0</version>
+                    </dependency>
+                </dependencies>
+    		</plugin>
+    	</plugins>
+    </build>
+</project>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/edit/IndexAction.java
Wed Jan 17 21:38:25 2007
@@ -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;
+    }     
+}

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/view/IndexAction.java
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,20 @@
+package ${package}.view;
+
+import org.apache.struts2.dispatcher.DefaultActionSupport;
+
+/**
+ *
+ */
+public class IndexAction extends DefaultActionSupport {
+    private String name = "My Name";
+
+    public String execute() {
+        // Preform any logic here
+
+        return SUCCESS;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/struts.xml?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/struts.xml
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/struts.xml
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE struts PUBLIC
+    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+    "http://struts.apache.org/dtds/struts-2.0.dtd">
+ 
+<struts>
+    <constant name="struts.codebehind.defaultPackage" value="struts-portlet-default" />
+    <constant name="struts.codebehind.pathPrefix" value="/WEB-INF/" />
+
+	<include file="struts-portlet-default.xml" />
+</struts>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-input.jsp
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-input.jsp?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-input.jsp
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-input.jsp
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,10 @@
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<h1>StrutsPortlet</h1>
+This is the default edit page!
+<p />
+
+<s:form action="index" method="POST">
+    <s:textfield label="Preference one" name="preferenceOne" value="%{preferenceOne}"/>
+    <s:textfield label="Preference two" name="preferenceTwo" value="%{preferenceTwo}"/>
+    <s:submit name="submit" value="Save prefs"/>
+</s:form>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-success.jsp
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-success.jsp?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-success.jsp
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/edit/index-success.jsp
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,22 @@
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+The preferences has been saved:
+
+<p />
+
+<table>
+  <tr>
+    <th>Name</th>
+    <th>Value</th>
+  </tr>
+  <tr>
+    <td>Preference 1</td>
+    <td><s:property value="%{pref1}" /></td>
+  </tr>
+  <tr>
+    <td>Preference 2</td>
+    <td><s:property value="%{pref2}" /></td>
+  </tr>
+</table>  
+
+<a href="<s:url action="index"/>">Back</a>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/help/index.jsp
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/help/index.jsp?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/help/index.jsp
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/help/index.jsp
Wed Jan 17 21:38:25 2007
@@ -0,0 +1 @@
+This is the default help page!

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,63 @@
+<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
id="struts-portlet">
+  <portlet id="StrutsPortlet">
+    <description xml:lang="EN">Blank Struts Portlet</description>
+    <portlet-name>StrutsPortlet</portlet-name>
+    <display-name xml:lang="EN">Blank Struts Portlet</display-name>
+    
+    <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
+
+    <init-param>
+        <name>actionPackages</name>
+        <value>${package}</value>
+    </init-param>
+    <init-param>
+		<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
+		<name>viewNamespace</name>
+		<value>/view</value>
+	</init-param>
+    <init-param>
+		<!-- The default action to invoke in view mode -->
+		<name>defaultViewAction</name>
+		<value>index</value>
+	</init-param>
+	<init-param>
+		<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
+		<name>editNamespace</name>
+		<value>/edit</value>
+	</init-param>
+    <init-param>
+		<!-- The default action to invoke in view mode -->
+		<name>defaultEditAction</name>
+		<value>index</value>
+	</init-param>
+	<init-param>
+		<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
+		<name>helpNamespace</name>
+		<value>/help</value>
+	</init-param>
+    <init-param>
+		<!-- The default action to invoke in view mode -->
+		<name>defaultHelpAction</name>
+		<value>index</value>
+	</init-param>
+    
+    <expiration-cache>0</expiration-cache>
+
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>edit</portlet-mode>
+      <portlet-mode>help</portlet-mode>
+    </supports>
+
+    <supported-locale>en</supported-locale>
+
+    <portlet-info>
+      <title>Struts Blank Porlet</title>
+      <short-title>SB</short-title>
+      <keywords>struts,portlet</keywords>
+    </portlet-info>
+  </portlet>
+  
+</portlet-app>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/view/index.jsp
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,14 @@
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<H2>Welcome to the Struts blank portlet</H2>
+<p/>
+This is an example of accessing the action's properties:
+<table>
+ <tr>
+  <th>Name</th>
+  <td><s:property value="%{name}" /></td>
+ </tr>
+</table>
+<ul>
+<li><a href="<s:url action="index" portletMode="edit"/>">Go to edit mode
and see what's there</a></li>
+<li><a href="<s:url action="index" portletMode="help"/>">Go to help mode
and see what's there</a></li>
+</ul>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app id="ConfluenceStatsPortlet">
+
+    <filter id="filterdispatcher">
+		<filter-name>struts</filter-name>
+		<filter-class>
+			org.apache.struts2.dispatcher.FilterDispatcher
+		</filter-class>
+        <init-param>
+            <param-name>actionPackages</param-name>
+            <param-value>${package}</param-value>
+        </init-param>
+    </filter>
+
+	<filter-mapping>
+		<filter-name>struts</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+    
+	<listener>
+		<listener-class>
+			org.apache.struts2.portlet.context.ServletContextHolderListener
+		</listener-class>
+	</listener>
+
+	<servlet id="preparator">
+		<servlet-name>preparator</servlet-name>
+		<servlet-class>
+			org.apache.struts2.portlet.context.PreparatorServlet
+		</servlet-class>
+	</servlet>
+</web-app>

Added: struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/index.jsp?view=auto&rev=497309
==============================================================================
--- struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/index.jsp
(added)
+++ struts/maven/trunk/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/index.jsp
Wed Jan 17 21:38:25 2007
@@ -0,0 +1,4 @@
+<%
+    String redirectURL = "view/index.action";
+    response.sendRedirect(redirectURL);
+%>



Mime
View raw message