mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
WW-1349 Update MailReader tour. Conform properties in blank and starter.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@439064 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
struts.objectFactory = spring
|
||||
struts.devMode = true
|
||||
struts.enable.DynamicMethodInvocation = false
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
Of course, the full source code to the MailReader is included in the
|
||||
distribution.
|
||||
</i>
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -216,8 +215,20 @@
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
Among other things,
|
||||
the web.xml specifies the "Welcome File List" for an application.
|
||||
You might note taht the web.xml configuration does not specify which file extension
|
||||
to use with actions.
|
||||
The default extension for Struts 2 is ".action",
|
||||
but the extension can be changed in the struts.properties file.
|
||||
For compatability with prior releases, the MailReader uses a .do extension for actions.
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
<h5>struts.properties</h5>
|
||||
<pre><code>struts.action.extension = <strong>do</strong></code></pre>
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
The web.xml does specify a "Welcome File List" for the application.
|
||||
When a web address refers to a directory rather than an individual file,
|
||||
the container consults the Welcome File List for the name of a page to
|
||||
open by default.
|
||||
@@ -251,6 +262,7 @@
|
||||
page to a certain action mapping.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
Sites can list zero or more "Welcome" pages in the web.xml.
|
||||
<a href="http://forum.java.sun.com/thread.jspa?threadID=721445">
|
||||
@@ -1263,7 +1275,8 @@ public void <strong>setSession(Map value)</strong> {
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
You might notice that the name of the Logon action element is not "Logon" but "Logon!*".
|
||||
You might notice that the name of the Logon action element is not "Logon"
|
||||
but "Logon<strong>!*</strong>".
|
||||
The asterisk is a special "wildcard" notation that tells the framework to match any series
|
||||
of character at this point.
|
||||
In the method attribute,
|
||||
@@ -1273,13 +1286,25 @@ public void <strong>setSession(Map value)</strong> {
|
||||
the framework matches "cancel" or "input" with the wildcard and fills in the blanks.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The "trailing bang" notation was hardwired into WebWork 2.
|
||||
To provide backward compatibility,
|
||||
the notation is supported by Struts 2.0.
|
||||
If you prefer to use wildcards to emulate the same notation,
|
||||
as the Mailreader does,
|
||||
you should disable the old notation in the Struts properties file.
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
<h5>struts.properties</h5>
|
||||
<pre><code>struts.enable.DynamicMethodInvocation = false</code></pre>
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
Using wildcards with a exclamation point (or "bang") is not the only way we can use
|
||||
wilcards.
|
||||
wilcards to invoke methods.
|
||||
If we wanted to use actions like "inputLogin",
|
||||
we could move the asterisk and use an action name like "*Logon".
|
||||
(Albeit, the trailing bang is a common convention,
|
||||
adopted from on a similar WebWork 2 feature.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
struts.objectFactory = spring
|
||||
struts.devMode = true
|
||||
struts.enable.DynamicMethodInvocation = false
|
||||
|
||||
Reference in New Issue
Block a user