husted 2002/06/09 15:23:25
Modified: doc/userGuide introduction.xml installation.xml
building_view.xml building_controller.xml
Log:
Routine updates to documentation, including patches submitted by James DeVries [Bug
8664], Michael K [Bug 8758], and Dominique Plante [Bug 9641].
Revision Changes Path
1.9 +38 -21 jakarta-struts/doc/userGuide/introduction.xml
Index: introduction.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/introduction.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- introduction.xml 4 Nov 2001 03:07:34 -0000 1.8
+++ introduction.xml 9 Jun 2002 22:23:25 -0000 1.9
@@ -8,6 +8,7 @@
<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>
@@ -113,9 +114,17 @@
<p>
True to the Model-View-Controller design pattern, Struts applications
have three
- 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.
+ major components:
+ </p>
+
+ <ul>
+ <li>a servlet controller, which is provided by Struts itself,</li>
+ <li>JSP pages (the "view"), and</li>
+ <li>the application's business logic (or the "model").</li>
+ </ul>
+
+ <p>
+ Let's step through how this all fits together.
</p>
<p>
@@ -129,16 +138,17 @@
</p>
<p>
- An ActionMapping will usually specify:</p>
+ An ActionMapping will usually contain a number of properties including:</p>
<ul>
- <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>
+ <li>a <b>request path</b> (or "URI"),</li>
+ <li>the <b>object type</b> (Action subclass) to act upon the request,
and</li>
+ <li>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. For example, if a login succeeds, a login action may wish
- to forward the request onto the mainMenu.
+ <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. For
example, if
+ a login succeeds, a login action may wish to forward the request onto the
+ mainMenu page.
</p>
<p>
@@ -149,14 +159,15 @@
</p>
<p>
- An Action object can create a shopping cart bean, add an item to the
+ For example, 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. 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>
+ so that the Action can focus on error handling and where to forward
control.
+ </p>
<p>
JavaBeans can also be used to manage input forms. A key problem in
designing
@@ -177,15 +188,21 @@
<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.
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.
+ source file, and linked to an ActionMapping using a common property name.
Here is
+ the sequence of 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>If the request is being used to to submit an input page, the Action
object
+ can examine the data. If necessary, the data can be sent back to the input
+ form along with a list of messages to display on the page. Otherwise the
data can
+ be passed along to the business tier.</li>
+ <li>If the request is being used to create an input page, the Action object
can
+ populate the form bean with any data that the input page might need. </li>
+ </ul>
<p>
The Struts framework includes custom tags that can automatically populate
1.3 +2 -4 jakarta-struts/doc/userGuide/installation.xml
Index: installation.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/installation.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- installation.xml 3 Mar 2002 05:10:56 -0000 1.2
+++ installation.xml 9 Jun 2002 22:23:25 -0000 1.3
@@ -44,14 +44,11 @@
Struts, below.</li>
<li><strong>Ant Build System</strong> - If you are building Struts from the
- source distribution, you must download and install version 1.3 or later
+ source distribution, you must download and install version 1.4 (or later)
of the <a href="http://jakarta.apache.org/ant">Ant</a> build system.
This package is also strongly recommended for use in developing your
own web applications based on Struts.
<ul>
- <li>If you are using the release version of Ant version 1.3, you will
- also need to download the "optional.jar" file that contains the
- implementation of Ant's <code><style></code> command.</li>
<li>Make sure that the "ant" and "ant.bat" scripts are executable, by
adding the $ANT_HOME/bin directory to your PATH environment
variable.</li>
@@ -248,6 +245,7 @@
<li>Orion Application Server - <a href="installation-oas.html">Additional steps
required.</a></li>
<li>Resin 1.2+ "standalone" - No additional steps required.</li>
+ <li>RexIP - No additional steps required.</li>
<li>SilverStream 3.7.1 and later - <a href="installation-sas.html">Additional
steps required.</a></li>
<li>Tomcat 3.1 and prior - Not recommended. Use Tomcat 3.2.1 or later.</li>
<li>Tomcat 3.2.1 with Apache - <a href="installation-tc.html">Additional steps
1.10 +4 -3 jakarta-struts/doc/userGuide/building_view.xml
Index: building_view.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_view.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- building_view.xml 12 Mar 2002 04:45:22 -0000 1.9
+++ building_view.xml 9 Jun 2002 22:23:25 -0000 1.10
@@ -7,6 +7,7 @@
<author>Ted Husted</author>
<author>Martin Cooper</author>
<author>Ed Burns</author>
+ <author>James DeVries</author>
<title>The Struts User's Guide - Building View Components</title>
</properties>
@@ -53,7 +54,7 @@
language (plus an optional language variant), and also a set of
formatting assumptions for things like numbers and dates.</li>
<li><b>ResourceBundle</b> - The <code>java.util.ResourceBundle</code> class
- provides the fundmental tools for supporting messages in multiple
+ provides the fundamental tools for supporting messages in multiple
languages. See the Javadocs for the <code>ResourceBundle</code> class,
and the information on Internationalization in the documentation bundle
for your JDK release, for more information.</li>
@@ -396,7 +397,7 @@
methods it exposes to manipulate files in file uploading. Also look at
the
Javadocs for ActionServlet and ActionMapping for the various parameters
you can specify to change how files are uploaded. Basically in your
- peform() method in your action class you would call <code>((UploadForm)
form).getMyFile()</code>
+ perform() method in your action class you would call <code>((UploadForm)
form).getMyFile()</code>
to retrieve the FormFile and do what you want with it.
</p>
@@ -601,7 +602,7 @@
<li>An <code><%@ include file="xxxxx" %></code> directive can
include a file that contains
Java code or JSP tags. The code in the included file can even reference
variables declared earlier in the outer jsp page. The code is inlined into
- the other JavaServer Page before it is compiled so it can definately
contain more than
+ the other JavaServer Page before it is compiled so it can definitely
contain more than
just HTML.</li>
<li>The include <i>action</i> (<code><jsp:include page="xxxxx"
flush="true" /></code>) is processed at request time, and is
handled
1.12 +2 -2 jakarta-struts/doc/userGuide/building_controller.xml
Index: building_controller.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_controller.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- building_controller.xml 13 May 2002 02:12:27 -0000 1.11
+++ building_controller.xml 9 Jun 2002 22:23:25 -0000 1.12
@@ -114,8 +114,8 @@
<li>The beans that represent the Model of your system may throw exceptions
due to problems accessing databases or other resources.
You should trap all such exceptions
- in the logic of your <code>perform()</code> method, and log them to the
- application logfile (along with the corresponding stack trace) by
+ in the logic of your <code>perform()</code> method, and record them in
the
+ application's log (along with the corresponding stack trace) by
calling:<br />
<code>servlet.log("Error message text", exception);</code></li>
<li>As a general rule, allocating scarce resources and keeping them across
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>