Skip to content

Commit

Permalink
WW-4085 Adds default-action-ref to configuration of example apps
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1488108 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
lukaszlenart committed May 31, 2013
1 parent 2382586 commit 8d209da
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -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>
<package name="example" namespace="/example" extends="struts-default">

<action name="Login_*" method="{1}" class="${package}.example.Login">
<result name="input">/example/Login.jsp</result>
<result type="redirectAction">Menu</result>
</action>
<default-action-ref name="HelloWorld" />

<action name="*" class="${package}.example.ExampleSupport">
<result>/example/{1}.jsp</result>
</action>

<!-- Add additional "example" package actions here. -->

</package>
<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>
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 8d209da

Please sign in to comment.