forked from apache/struts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
2382586
commit 8d209da
Showing
3 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
37 changes: 20 additions & 17 deletions
37
...ts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
29 changes: 21 additions & 8 deletions
29
...uts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/struts.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
28 changes: 17 additions & 11 deletions
28
...s2-archetype-starter/src/main/resources/archetype-resources/src/main/resources/struts.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |