You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2013/05/31 08:30:45 UTC

svn commit: r1488108 - in /struts/struts2/trunk/archetypes: struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/ struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/

Author: lukaszlenart
Date: Fri May 31 06:30:45 2013
New Revision: 1488108

URL: http://svn.apache.org/r1488108
Log:
WW-4085 Adds default-action-ref to configuration of example apps

Modified:
    struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml
    struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/struts.xml
    struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/struts.xml

Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml?rev=1488108&r1=1488107&r2=1488108&view=diff
==============================================================================
--- struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml (original)
+++ struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml Fri May 31 06:30:45 2013
@@ -1,27 +1,30 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE struts PUBLIC
-	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
-	"http://struts.apache.org/dtds/struts-2.3.dtd">
+        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
+        "http://struts.apache.org/dtds/struts-2.3.dtd">
 <!-- 
   - This file is included by the struts.xml file as an example
   - of how to break up the configuration file into multiple files.
 -->
 <struts>
-  <package name="example" namespace="/example" extends="struts-default">
-    <action name="HelloWorld" class="${package}.example.HelloWorld">
-      <result>/example/HelloWorld.jsp</result>
-    </action>
-
-    <action name="Login_*" method="{1}" class="${package}.example.Login">
-      <result name="input">/example/Login.jsp</result>
-      <result type="redirectAction">Menu</result>
-    </action>
-
-    <action name="*" class="${package}.example.ExampleSupport">
-      <result>/example/{1}.jsp</result>
-    </action>
-    
-    <!-- Add additional "example" package actions here. -->
-    
-  </package>
+    <package name="example" namespace="/example" extends="struts-default">
+
+        <default-action-ref name="HelloWorld" />
+
+        <action name="HelloWorld" class="${package}.example.HelloWorld">
+            <result>/example/HelloWorld.jsp</result>
+        </action>
+
+        <action name="Login_*" method="{1}" class="${package}.example.Login">
+            <result name="input">/example/Login.jsp</result>
+            <result type="redirectAction">Menu</result>
+        </action>
+
+        <action name="*" class="${package}.example.ExampleSupport">
+            <result>/example/{1}.jsp</result>
+        </action>
+
+        <!-- Add additional "example" package actions here. -->
+
+    </package>
 </struts>

Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/struts.xml?rev=1488108&r1=1488107&r2=1488108&view=diff
==============================================================================
--- struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/struts.xml (original)
+++ struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/struts.xml Fri May 31 06:30:45 2013
@@ -1,12 +1,25 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE struts PUBLIC
-	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
-	"http://struts.apache.org/dtds/struts-2.3.dtd">
+        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
+        "http://struts.apache.org/dtds/struts-2.3.dtd">
 <struts>
-  <constant name="struts.enable.DynamicMethodInvocation" value="false"/>
-  <constant name="struts.devMode" value="true"/>
-  
-  <include file="example.xml"/>
-  
-  <!-- Add addition packages and configuration here. -->
+    <constant name="struts.enable.DynamicMethodInvocation" value="false"/>
+    <constant name="struts.devMode" value="true"/>
+
+    <include file="example.xml"/>
+
+    <package name="default" namespace="/" extends="struts-default">
+
+        <default-action-ref name="index"/>
+
+        <action name="index">
+            <result type="redirectAction">
+                <param name="actionName">HelloWorld</param>
+                <param name="namespace">/example</param>
+            </result>
+        </action>
+
+    </package>
+
+    <!-- Add addition packages and configuration here. -->
 </struts>

Modified: struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/struts.xml?rev=1488108&r1=1488107&r2=1488108&view=diff
==============================================================================
--- struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/struts.xml (original)
+++ struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/struts.xml Fri May 31 06:30:45 2013
@@ -1,19 +1,25 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE struts PUBLIC
-	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
-	"http://struts.apache.org/dtds/struts-2.3.dtd">
+        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
+        "http://struts.apache.org/dtds/struts-2.3.dtd">
 
 <struts>
 
     <constant name="struts.enable.DynamicMethodInvocation" value="false"/>
 
-	<package name="myPackage" extends="struts-default">
-		<action name="index" class="${package}.IndexAction">
-			<result>/jsp/index.jsp</result>
-		</action>
-		<action name="helloWorld" class="helloWorldAction"> 
-			<result name="input">/jsp/index.jsp</result>
-			<result>/jsp/helloWorld.jsp</result>
-		</action>
-	</package>
+    <package name="myPackage" extends="struts-default">
+
+        <default-action-ref name="index" />
+
+        <action name="index" class="${package}.IndexAction">
+            <result>/jsp/index.jsp</result>
+        </action>
+
+        <action name="helloWorld" class="helloWorldAction">
+            <result name="input">/jsp/index.jsp</result>
+            <result>/jsp/helloWorld.jsp</result>
+        </action>
+
+    </package>
+
 </struts>