mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-4085 Adds default-action-ref to configuration of example apps
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1488108 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+20
-17
@@ -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>
|
||||
|
||||
+21
-8
@@ -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>
|
||||
|
||||
+17
-11
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user