Author: husted Date: Thu Aug 31 15:11:29 2006 New Revision: 439064 URL: http://svn.apache.org/viewvc?rev=439064&view=rev Log: WW-1349 Update MailReader tour. Conform properties in blank and starter.
Modified: struts/struts2/trunk/apps/blank/src/main/resources/struts.properties struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/tour.html struts/struts2/trunk/apps/starter/src/main/resources/struts.properties Modified: struts/struts2/trunk/apps/blank/src/main/resources/struts.properties URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/resources/struts.properties?rev=439064&r1=439063&r2=439064&view=diff ============================================================================== --- struts/struts2/trunk/apps/blank/src/main/resources/struts.properties (original) +++ struts/struts2/trunk/apps/blank/src/main/resources/struts.properties Thu Aug 31 15:11:29 2006 @@ -1,2 +1,2 @@ -struts.objectFactory = spring struts.devMode = true +struts.enable.DynamicMethodInvocation = false Modified: struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/tour.html URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/tour.html?rev=439064&r1=439063&r2=439064&view=diff ============================================================================== --- struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/tour.html (original) +++ struts/struts2/trunk/apps/mailreader/src/main/webapp/pages/tour.html Thu Aug 31 15:11:29 2006 @@ -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 @@ <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, @@ -1274,12 +1287,24 @@ </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> Modified: struts/struts2/trunk/apps/starter/src/main/resources/struts.properties URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/starter/src/main/resources/struts.properties?rev=439064&r1=439063&r2=439064&view=diff ============================================================================== --- struts/struts2/trunk/apps/starter/src/main/resources/struts.properties (original) +++ struts/struts2/trunk/apps/starter/src/main/resources/struts.properties Thu Aug 31 15:11:29 2006 @@ -1,2 +1,2 @@ -struts.objectFactory = spring struts.devMode = true +struts.enable.DynamicMethodInvocation = false