webwork/src/docs/manual fundamentals-configure.html,1.2,1.3
[email protected] Fri, 31 Oct 2003 19:25:13 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/docs/manual In directory sc8-pr-cvs1:/tmp/cvs-serv30489/src/docs/manual Modified Files: fundamentals-configure.html Log Message: s/log4j/commons-logging Index: fundamentals-configure.html =================================================================== RCS file: /cvsroot/opensymphony/webwork/src/docs/manual/fundamentals-configure.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fundamentals-configure.html 18 Jul 2002 13:57:46 -0000 1.2 +++ fundamentals-configure.html 1 Nov 2003 03:25:10 -0000 1.3 @@ -33,32 +33,32 @@ It will ask the first factory in the chain for the action. This factory will either return the appropriate action or pass the request up the chain for the next factory to service the request.</li> <li><em>webwork.configuration</em> - Class WW will use to load configurations. The default is DefaultConfiguration.</li> - <li><em>webwork.configuration.properties</em> - The list of property files WW will load. - By default, WW will load webwork.properties and default.properties files to look for this property setting. - It will then load all indicated property files and XML view config file indicated by webwork.configuration.xml. + <li><em>webwork.configuration.properties</em> - The list of property files WW will load. + By default, WW will load webwork.properties and default.properties files to look for this property setting. + It will then load all indicated property files and XML view config file indicated by webwork.configuration.xml. Only these last configuration files are used. By default this property is set to views,webwork,webwork/default.</li> - <li><em>webwork.configuration.xml</em> - The XML view configuration file. The default is actions. + <li><em>webwork.configuration.xml</em> - The XML view configuration file. The default is actions. You can null it by setting its = to nothing if you do not plan to map your views this way.</li> <li><em>webwork.log4j.configfile</em> - The configuration file to use to configure log4j logger. You can null it by setting its = to nothing if you do not want WW to configure log4j. </li> <li><em>webwork.action.extension</em> - The extension WW will use to identify an action. You will need to modify your web.xml as well if you change it from the default “action.” </li> - <li><em>webwork.multipart.parser</em> - The parser WW should use for multi-part content.</li> - <li><em>webwork.multipart.saveDir</em> - The directory WW should save the multi-part content to.</li> - <li><em>webwork.multipart.maxSize</em> - The maximum file size WW will allow for multi-part content.</li> + <li><em>webwork.multipart.parser</em> - The parser WW should use for multi-part content.</li> + <li><em>webwork.multipart.saveDir</em> - The directory WW should save the multi-part content to.</li> + <li><em>webwork.multipart.maxSize</em> - The maximum file size WW will allow for multi-part content.</li> </ul> -<p>See <a href="default.properties">Default Configuration</a> for an example configuration setting that WW uses by default. +<p>See <a href="default.properties">Default Configuration</a> for an example configuration setting that WW uses by default. You may override any item you see fit.</p> <b>How do I override a property?</b> <p>Overriding WW's property settings is easy. By default, it looks for webwork.properties file in your classpath. Normally, you would place this file in WEB-INF/classes. In this file, you just add any WW property you want to override. -In addition, you can add other properties that your programs may need in this file and get access to it via +In addition, you can add other properties that your programs may need in this file and get access to it via <em>webwork.config.Configuration</em>'s static methods.</p> -<p>For instance, we can override webwork.action.packages to include a company's (Acme) +<p>For instance, we can override webwork.action.packages to include a company's (Acme) actions by providing a webwork.properties file in the web application's classpath with this line -</p> <pre>webwork.action.packages=com.acme.action</pre> @@ -70,18 +70,18 @@ <pre><form action="<webwork:url page="testfoo.action"/>" method="POST"></pre> -<p>Listed below is an example of a views.properties file. Note, <em>Test!foo</em> defines a command driven action. -This means alias testfoo.action will cause WW to retrieve action Test and invoke method doFoo. +<p>Listed below is an example of a views.properties file. Note, <em>Test!foo</em> defines a command driven action. +This means alias testfoo.action will cause WW to retrieve action Test and invoke method doFoo. The return value will be success and WW will then resolve alias testfoo.success and test.jsp will be rendered. -See the <a href="howto-wizard.html">Wizards</a> for more information. +See the <a href="howto-wizard.html">Wizards</a> for more information. </p> <em>testfoo.action=Test!foo<br> testfoo.success=test.jsp </em> -<p>If you prefer to define your view in an XML file rather than a properties file, you do so by providing an XML -file named <em>actions.xml</em>. By default, WW will read in any views defined in this file. +<p>If you prefer to define your view in an XML file rather than a properties file, you do so by providing an XML +file named <em>actions.xml</em>. By default, WW will read in any views defined in this file. Here is an example of an actions.xml file.</p> Here is an example <a href="actions.xml">actions.xml</a> file. @@ -89,18 +89,18 @@ <p>The DTD for this XML configuration file can be found in the file /etc/<a href="actions.dtd">actions.dtd</a> in your WebWork distribution.</p> -<p>The algorithm used to find a view from your configuration file is as follows:</p> +<p>The algorithm used to find a view from your configuration file is as follows:</p> <ol> It queries the configuration for the actionName.viewName entry. If found, then that is used. -If not found, then parts of the action name are removed until a match is found. -For example, suppose we have a view mapping shown below and an action foo.bar was executed and it returned SUCCESS, WW would look for foo.bar.success. However, it would not find a match so the algorithm would remove bar and look for foo.success and it will find a match. This allows you to define global mappings for login, error, success, or whatever you want. +If not found, then parts of the action name are removed until a match is found. +For example, suppose we have a view mapping shown below and an action foo.bar was executed and it returned SUCCESS, WW would look for foo.bar.success. However, it would not find a match so the algorithm would remove bar and look for foo.success and it will find a match. This allows you to define global mappings for login, error, success, or whatever you want. </ol> <pre>foo.success=foo.jsp</pre> <a name="logger"><h3>Logger</h3></a> <p>WW uses <a href="http://jakarta.apache.org/log4j/docs/index.html">log4j</a> as its logger. -This is a powerful, flexible logger that provide a logging service to applications. +This is a powerful, flexible logger that provide a logging service to applications. WW configures its logger by a property file named <em>log4j.properties</em> which is listed below.</p> <pre> @@ -116,7 +116,7 @@ </pre> <b>How do I log from within my Actions?</b> -<p>Most application's Actions will extend the base action ActionSupport. +<p>Most application's Actions will extend the base action ActionSupport. This action provides a protected log attribute for you to use to write out logs from within your actions.</p> <b>How do I log to a file?</b> ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/