DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9641>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9641 [PATCH] Readability improvements to struts user guide introduction Summary: [PATCH] Readability improvements to struts user guide introduction Product: Struts Version: 1.1 Beta 1 Platform: All OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Documentation AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] --- introduction.xml Wed Jun 5 10:00:26 2002 +++ introduction.xml.orig Wed Jun 5 02:28:32 2002 @@ -8,7 +8,6 @@ <author>Ted Husted</author> <author>Martin Cooper</author> <author>Ed Burns</author> - <author>Dominique Plante</author> <title>The Struts User's Guide - Introduction</title> </properties> @@ -44,9 +43,6 @@ will be used in nearly all Java Web development projects. </p> - <p>It would also help to know about design patterns, specifically MVC, which is what Struts is - an implementation of and the Command pattern, which is used by Struts</p> - </section> <section name="1.1 Preface: Forward into the Past! (or a brief history of Struts)" href="preface"> @@ -117,15 +113,10 @@ <p> True to the Model-View-Controller design pattern, Struts applications have three - major components: - </p> - <ul> - <li>Model - This represents the application's business logic</li> - <li>View - JSP pages</li> - <li>Controller - a servlet controller which is provided by Struts itself</li> - </ul> - - <p>Let's step through how this all fits together.</p> + major components: a servlet controller, which is provided by Struts itself, + JSP pages (the "view"), and the application's business logic (or the + "model"). Let's step through how this all fits together. + </p> <p> The Struts controller servlet bundles and routes HTTP requests to other @@ -138,20 +129,18 @@ </p> <p> - An ActionMapping will usually contain a number of properties including:</p> + An ActionMapping will usually specify:</p> <ul> - <li>a <b>request path</b> (or "URI")</li> - <li>the <b>object type</b> (Action subclass) to act upon the request</li> + <li><b>a request path</b> (or "URI"),</li> + <li>the <b>object type</b> (Action subclass) to act upon the request, </li> + <li>and other properties as needed. </li> </ul> - <p>The Action object can handle the request and respond to the client (usually a Web browser), or indicate that control should be forwarded - elsewhere.</p> - - <p>For example, if a login succeeds, a login action may wish to forward the - request onto the mainMenu. + elsewhere. For example, if a login succeeds, a login action may wish + to forward the request onto the mainMenu. </p> - + <p> Action objects have access to the application's controller servlet, and so have access to that servlet's methods. When forwarding control, an Action object can indirectly @@ -160,13 +149,11 @@ </p> <p> - For example, an Action object can create a shopping cart bean, add an item to the + An Action object can create a shopping cart bean, add an item to the cart, place the bean in the session collection, and then forward control to another mapping. That mapping may use a JavaServer Page to display the contents of the user's cart. Since each client has their own session, they will each also have their own - shopping cart.</p> - - <p>In a Struts application, most of the business logic can be + shopping cart. In a Struts application, most of the business logic can be represented using JavaBeans. An Action can call the properties of a JavaBean without knowing how it actually works. This encapsulates the business logic, so that the Action can focus on error handling and where to forward control.</p> @@ -190,20 +177,15 @@ <p> A Struts form bean is declared in the configuration resource, defined in a Java - source file, and linked to an ActionMapping using a common property name. + source file, and linked to an ActionMapping using a common property name. When + a request calls for an Action that uses a form bean, the controller servlet + either retrieves or creates the form bean, and passes it to the Action object. + The Action object can then check the contents of the form bean before its input + form is displayed, and also queue messages to be handled by the form. When + ready, the Action object can return control with a forwarding to its input + form, usually a JSP. The controller can then respond to the HTTP request and + direct the client to the JavaServer Page. </p> - - <p>Here is the sequence events that occur when a request calls for an action that uses a form bean:</p> - <ul> - <li>the controller servlet either retrieves or creates the form bean</li> - <li>the controller servlet passes the form bean to the Action object</li> - <li>the Action object can then check the contents of the form bean before its - input form is displayed, and also queue messages to be handled by the form</li> - <li>when ready, the Action object then returns control with a forwarding to its input - form, usually a JSP (or ?)</li> - <li>The controller then responds to the HTTP request and direct the client to - the JSP specified by the Action object. (or ?)</li> - </ul> <p> The Struts framework includes custom tags that can automatically populate -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>