husted 2003/09/11 16:08:28 Modified: doc index.xml Log: + Add Struts in a Nutshell section. Revision Changes Path 1.50 +98 -0 jakarta-struts/doc/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-struts/doc/index.xml,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- index.xml 9 Sep 2003 17:49:21 -0000 1.49 +++ index.xml 11 Sep 2003 23:08:28 -0000 1.50 @@ -66,6 +66,104 @@ </section> + <section name="Struts in a Nutshell" href="nutshell"> + + <p> + A <a href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/WebApp.html">web application</a> uses a + deployment descriptor to initialize resources like <a href="userGuide/preface.html#servlets">servlets</a> + and <a href="userGuide/preface.html#jsp">taglibs</a>. + The deployment descriptor is formatted as a <a href="userGuide/preface.html#xml">XML</a> document and named + "web.xml". + Likewise, Struts uses a configuration file to initialize its own resources. + These resources include <a href="userGuide/building_controller.html#action_form_classes">ActionForms</a> to + collect input from users, + <a href="http://jakarta.apache.org/struts/userGuide/building_controller.html#actionmapping"> + ActionMappings</a> to direct input to server-side + <a href="http://jakarta.apache.org/struts/userGuide/building_controller.html#action_classes">Actions</a>, + and ActionForwards to select output pages. + </p> + + <p> + Here's a simple Struts configuration (struts-config.xml) for a login workflow: + </p> + + <pre><code><![CDATA[ + <?xml version="1.0" encoding="ISO-8859-1" ?> + <!DOCTYPE struts-config PUBLIC + "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" + "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd"> + <struts-config> + <form-beans> + <form-bean + name="logonForm" + type="app.LogonForm"/> + </form-beans> + <action-mappings> + <action + path="/Welcome" + forward="/pages/Welcome.jsp"/> + <action + path="/Logon" + forward="/pages/Logon.jsp"/> + <action + path="/LogonSubmit" + type="app.LogonAction" + name="logonForm" + scope="request" + validate="true" + input="/Logon.do"> + <forward + name="success" + path="/Welcome.do"/> + <forward + name="failure" + path="/Logon.do"/> + </action> + <action + path="/Logoff" + type="app.LogoffAction"> + <forward + name="success" + path="/Welcome.do"/> + </action> + </action-mappings> + <message-resources parameter="resources.application"/> + </struts-config> + ]]></code></pre> + + <p> + There are several other resources you can specify in Struts configuration files. + You can specify validations for the ActionForms in an XML descriptor, using the + <a href="userGuide/dev_validator.html">Struts Validator</a>. + Another extension, <a href="userGuide/dev_tiles.html">Tiles</a>, helps you build pages from smaller + fragments. + </p> + + <p> + Struts is an extensible framework. + Every class deployed by Struts can be replaced by your own default class. + The properties of your default class can be set using the + <a href="http://jakarta.apache.org/commons/digester/"> Digester's</a> <code>set-property</code> feature. + This is one reason why there are so many <a href="resources/extensions.html">contributor extensions</a> for + Struts. + Struts provides a base framework, but you can still write <b>your</b> application <b>your</b> way. + </p> + + <p> + For more about Struts and its underlying technologies, see the <a href="userGuide/index.html">User + Guide</a> and the Developer Guides. + </p> + + <p> + Struts is a volunteer project and all support for the framework is provided by unpaid volunteers. + This documentation bundle and the mailing lists are the primary ways to learn how to use Struts. + The next few pages are devoted to helping you understand what resources are available to you. + Since Struts is a volunteer project, and our resources are limited, it is important that we first help you + help yourself. + </p> + + </section> + <section name="Books about Struts" href="books"> <div class="center">
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]