Author: husted
Date: Fri Jul 7 15:32:10 2006
New Revision: 420001
URL: http://svn.apache.org/viewvc?rev=420001&view=rev
Log:
STR-2898 : Updates and tweaks to FAQs and HOWTOs
Modified:
struts/struts1/trunk/apps/cookbook/src/main/webapp/WEB-INF/chain-config.xml
struts/struts1/trunk/core/src/main/resources/org/apache/struts/chain/chain-config.xml
struts/struts1/trunk/src/site/fml/faqs/kickstart.fml
struts/struts1/trunk/src/site/fml/faqs/newbie.fml
struts/struts1/trunk/src/site/xdoc/faqs/apps.xml
struts/struts1/trunk/src/site/xdoc/faqs/db-howto.xml
struts/struts1/trunk/src/site/xdoc/faqs/validator.xml
struts/struts1/trunk/src/site/xdoc/faqs/works.xml
struts/struts1/trunk/src/site/xdoc/userGuide/building_controller.xml
struts/struts1/trunk/src/site/xdoc/userGuide/introduction.xml
struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml
Modified:
struts/struts1/trunk/apps/cookbook/src/main/webapp/WEB-INF/chain-config.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/webapp/WEB-INF/chain-config.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/webapp/WEB-INF/chain-config.xml
(original)
+++ struts/struts1/trunk/apps/cookbook/src/main/webapp/WEB-INF/chain-config.xml
Fri Jul 7 15:32:10 2006
@@ -22,7 +22,7 @@
<!--
This file contains definitions of the standard Chain Of Responsibility
- chains that emulate Struts 1.x processing functionality. These chains
+ chains that emulate Struts 1.2 processing functionality. These chains
are defined in a catalog named "struts" so that the application can
use the default catalog for its own purposes, without any potential for
name clashes.
Modified:
struts/struts1/trunk/core/src/main/resources/org/apache/struts/chain/chain-config.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/resources/org/apache/struts/chain/chain-config.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
---
struts/struts1/trunk/core/src/main/resources/org/apache/struts/chain/chain-config.xml
(original)
+++
struts/struts1/trunk/core/src/main/resources/org/apache/struts/chain/chain-config.xml
Fri Jul 7 15:32:10 2006
@@ -22,7 +22,7 @@
<!--
This file contains definitions of the standard Chain Of Responsibility
- chains that emulate Struts 1.x processing functionality. These chains
+ chains that emulate Struts 1.2 processing functionality. These chains
are defined in a catalog named "struts" so that the application can
use the default catalog for its own purposes, without any potential for
name clashes.
Modified: struts/struts1/trunk/src/site/fml/faqs/kickstart.fml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/fml/faqs/kickstart.fml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/fml/faqs/kickstart.fml (original)
+++ struts/struts1/trunk/src/site/fml/faqs/kickstart.fml Fri Jul 7 15:32:10
2006
@@ -26,10 +26,7 @@
creating and maintaining applications to meet the demands
of today's public Web sites and enterprise intranets.
Struts combines standard Java
- technologies into a unified framework. The end result is a
- cooperative, synergistic framework, suitable for
- development teams, independent developers, and everyone in
- between.
+ technologies into a unified framework.
</p>
</answer>
@@ -39,13 +36,19 @@
<question>How does Struts work?</question>
<answer>
<p>Java Servlets are designed to handle requests made by Web
- browsers. Server pages are designed to create dynamic Web
- pages that can turn billboard sites into live
+ browsers. Server pages are designed to create dynamic web
+ pages that can turn billboard sites into interactive
applications. Struts uses a special
Servlet as a switchboard to route requests from Web
- browsers to the appropriate server page. This makes Web
- applications much easier to design, create, and
- maintain.</p>
+ browsers to the appropriate server page.
+ Along the way, a special Java class, called an Action,
+ can interact with a data access framework or business
+ logic classes.
+ A layered architecture makes enterprise-grade web
+ applications easier to create and maintain.
+ (For more detail, see the longer version of
+ <a href="works.html">"How Does Struts Work?".</a>)
+ </p>
</answer>
</faq>
@@ -53,14 +56,15 @@
<question>Is Struts compatible with other Java
technologies?</question>
<answer>
- <p>Yes. Struts is committed to supporting industry standards.
+ <p>Yes. The Apache Struts Project is committed to supporting
+ industry standards.
Struts acts as an integrator of Java technologies so that
they can be used in the "real world".</p>
</answer>
</faq>
<faq id="who">
- <question>Who wrote Struts"</question>
+ <question>Who wrote Struts?</question>
<answer>
<p>There are several
<a href="http://struts.apache.org/volunteers.html">active
committers</a>
@@ -84,9 +88,15 @@
<p>After serving as the co-lead of the JSR 127 specification
(JavaServerFaces), Craig created another rendition of
Struts
- based on JavaServerFaces, called Shale. Both Struts
- Framework and Struts Shale are first-class citizens of the
- Apache Struts project.</p>
+ based on JavaServer Faces, called Shale. The new framework
+ began as an Apache Struts subproject, but later Shale
+ graduated to a top-level Apache project
+ in its own right.
+ <a href="http://shale.apache.org/">
+ Apache Shale</a> is an excellent choice for teams
+ creating complex applications that utilize JSF
+ as a foundation technology.
+ </p>
</answer>
</faq>
@@ -100,8 +110,8 @@
Maverick, Tapestry, and Turbine, to name a few. Struts did
not enter a "greenfield". Back in the day, there were
lively comparisons between the available frameworks,
- just as there is today.
- </p>
+ just as there are today.
+ </p>
</answer>
</faq>
@@ -117,9 +127,12 @@
OnJava magazine between their reader surveys for 2005 and
2004 the popularity of Struts remained steady. Likewise,
the number of Struts articles published in all online
- journals also remained constant between 2004 and 2005. New
- and updated books about Struts continue to be published
- regularly.</p>
+ journals also remained constant between 2004 and 2005.
+ (For a complete list, see the
+ <a href="http://www.StrutsCentral.net/">
+ Struts Central website</a>.)
+ New and updated books about Struts continue to be
+ published regularly.</p>
<p>While some people characterize the space of Java web
application framework as being "fragmented", the truth is
that
@@ -131,12 +144,13 @@
</p>
<p>Of course, some developers are finding that JavaServer
Faces can be a faster way to write new applications,
- especially clean-cut intranet applications. And
+ especially modest intranet applications. And
that's great! More than anything else, every Struts
committer wants every developer to get more out of every
work day. (We're developers too!) As these new JSF
- applications
- grow in complexity, Struts Shale is ready to do for
+ applications grow in complexity, we're glad that
+ <a href="http://shale.apache.org/">
+ Apache Shale</a> is ready to do for
<em>JSF</em>
developers what Struts has
been doing for
@@ -146,9 +160,8 @@
</p>
<p>Meanwhile, enterprise web developers who have standardized
on Struts can be assured that new releases of
- Action 1 will continue, even as we break new ground with
- the upcoming release of Struts 2 (formerly known as
- WebWork).</p>
+ Struts 1 will continue, even as we break new ground with
+ Struts 2.</p>
</answer>
</faq>
@@ -158,8 +171,6 @@
<answer>
<p>The best place to download Apache Struts products is at
<a href="http://struts.apache.org/">struts.apache.org</a>
- . The nightly builds are very stable, and recommended as
- the best place to start today.
</p>
</answer>
</faq>
@@ -187,10 +198,10 @@
</p>
<p>Since the full source code for Struts is available, we also
provide
- <a href="../userGuide/installation.html">complete
+ <a href="http://struts.apache.org/downloads.html#Building">
instructions</a>
- for compiling your own Struts JAR from scratch. (This is
- actually easier than it looks!)
+ for compiling your own Struts JAR from scratch.
+ (With Maven, building Struts is easy!)
</p>
<p>Your Struts application can usually be deployed using a
standard WAR file. In most
@@ -207,12 +218,11 @@
</faq>
<faq id="jar">
- <question>When do I need "struts-action.jar" on my
+ <question>When do I need the Struts JARs on my
classpath?</question>
<answer>
<p>When you are compiling an application that uses the Struts
- classes, you must have the "struts-action.jar"
- on the classpath your
+ classes, you must have the Struts JARs on the classpath
your
<strong>compiler</strong>
sees -- it does not
<em>have</em>
@@ -220,7 +230,7 @@
</p>
<p>Why is that an important distinction? Because if you are
using a servlet container on your development machine to
- test your application, the "struts-action.jar"
+ test your application, the Struts JARs
<strong>must not</strong>
be on your CLASSPATH environment variable when running the
container. (This is because each Web application must also
@@ -231,11 +241,9 @@
<p>There are several general approaches to this issue:</p>
<ul>
<li>
- <strong>Use ANT</strong>
+ <strong>Use Ant or Maven</strong>
for building your projects -- it can easily assemble
- classpaths for the compiler. (This is how Struts
- itself is built, along with Tomcat and most other
- Java-based projects).
+ classpaths for the compiler.
</li>
<li>
<strong>Use an IDE</strong>
@@ -292,8 +300,7 @@
Struts TestCase</a>
which provides a useful harness for Action classes that
can be used with JUnit or
- <a href="http://jakarta.apache.org/cactus">Cactus</a>
- .
+ <a href="http://jakarta.apache.org/cactus">Cactus</a>.
</p>
</answer>
</faq>
Modified: struts/struts1/trunk/src/site/fml/faqs/newbie.fml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/fml/faqs/newbie.fml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/fml/faqs/newbie.fml (original)
+++ struts/struts1/trunk/src/site/fml/faqs/newbie.fml Fri Jul 7 15:32:10 2006
@@ -133,11 +133,10 @@
Meanwhile, DynaActionForms relieve developers of
maintaining simple ActionForms.
For near zero maintenance, try
- <a href="http://www.niallp.pwp.blueyonder.co.uk/">
+ <a
href="../userGuide/building_controller.html#lazy_action_form_classes/">
LazyActionForm</a>
and Hubert Rabago's
- <a href="https://formdef.dev.java.net/">FormDef</a>
- .
+ <a href="https://formdef.dev.java.net/">FormDef.</a>
</p>
</answer>
</faq>
@@ -153,9 +152,9 @@
Introspection API
with the ActionForms, some containers may require that all
the JavaBean patterns be followed, including
- declaring "
- <code>implements Serializable</code>
- " for each subclass. The safest thing is to review the
+ declaring
+ <code>"implements Serializable"</code>
+ for each subclass. The safest thing is to review the
<a href="../userGuide/preface.html#javabeans">JavaBean
specification</a>
and follow all the prescribed patterns.
@@ -183,7 +182,7 @@
</p>
<ul>
<li>
- ActionForms can have other beansor hashmaps as
+ ActionForms can have other beans or hashmaps as
properties
</li>
<li>
@@ -197,13 +196,12 @@
</li>
</ul>
<p>
- ActionForms (a.k.a. "form beans") are really just Java
- beans (with a few
- special methods) that the framework creates and puts into
- session or request scope for you.
+ ActionForms (a.k.a. "form beans") are really just JavaBeans
+ (with a few special methods) that the framework creates
+ and puts into session or request scope for you.
There is nothing preventing you from using other beans, or
- including
- them in your form beans. Here are some examples:
+ including them in your form beans.
+ Let's look at some examples.
</p>
<p>
<em>Collections as properties</em>
@@ -494,24 +492,19 @@
</ul>
<p>There are other rules to follow if you want other features
- of your
- form beans to be exposed. These include indexed attributes
- and mapped
- attributes. They are covered in detail in other areas of
- the
- documentation, in particular:</p>
-
- <a href="indexedprops.html">indexedprops.html</a>
-
+ of your form beans to be exposed,
+ especially in terms of indexed attributes and mapped
attributes.
+ Specific rules are covered in detail in other areas of
+ the documentation, in particular,
+ <a href="indexedprops.html">
+ Indexed Properties, Mapped Properties, and Indexed Tags.
+ </a></p>
<p>For a complete explanation of what a JavaBean is, and
- everything it can
- do, see the JavaBeans Specification (version 1.01) at:</p>
-
- <a
href="http://java.sun.com/products/javabeans/docs/beans.101.pdf">
-
http://java.sun.com/products/javabeans/docs/beans.101.pdf</a>
-
-
+ everything it can do,
+ see the
+ <a
href="http://java.sun.com/products/javabeans/docs/beans.101.pdf">
+ JavaBeans Specification (version 1.01).</a></p>
</answer>
</faq>
@@ -527,8 +520,7 @@
<code>DynaActionForm</code>
s to help reduce
the effort required, or use the code generation facilities
- of your
- IDE.
+ of your IDE.
</p>
<p>Some issues to keep in mind regarding reuse of form beans
Modified: struts/struts1/trunk/src/site/xdoc/faqs/apps.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/xdoc/faqs/apps.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/xdoc/faqs/apps.xml (original)
+++ struts/struts1/trunk/src/site/xdoc/faqs/apps.xml Fri Jul 7 15:32:10 2006
@@ -54,7 +54,7 @@
applications, but may also work with
other types of applications.</li>
<li>This material was originally written for Struts 1.1
(beta 2),
- and reviewed for the 1.2.2 and 1.3.0 releases.</li>
+ and reviewed for the 1.3.5 distribution.</li>
</ol>
</subsection>
@@ -82,8 +82,7 @@
<li>Create or update
<code>web.xml</code>
to reference
- <code>ActionServlet</code>
- , taglibs used by the framework.
+ <code>ActionServlet.</code>
</li>
<li>Parallel Tasks
<ol>
@@ -103,7 +102,7 @@
<code>html</code>
taglib
to define the form elements.
- <a
href="http://struts.apache.org/struts-taglib/tagreference-struts-bean.html">
+ <a
href="../struts-taglib/tagreference.html#struts-html.tld">
(more...)</a>
</li>
<li>Use
@@ -112,7 +111,7 @@
<code>bean</code>
taglib to define the labels and other static
text of the form.
- <a
href="http://struts.apache.org/struts-taglib/tagreference-struts-bean.html">
+ <a
href="../struts-taglib/tagreference.html#struts-bean.tld">
(more...)</a>
<ol>
<li>Create and maintain a properties file
@@ -201,7 +200,6 @@
to
reference
<code>ActionServlet</code>
- , taglibs used by Struts.
<a
href="../userGuide/configuration.html#5_4_The_Web_Application_Deployment_Descriptor">
(more...)</a>
</li>
Modified: struts/struts1/trunk/src/site/xdoc/faqs/db-howto.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/xdoc/faqs/db-howto.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/xdoc/faqs/db-howto.xml (original)
+++ struts/struts1/trunk/src/site/xdoc/faqs/db-howto.xml Fri Jul 7 15:32:10
2006
@@ -29,7 +29,7 @@
<p>
Most developers would consider accessing a database part of
the "business
- end" of an application. Most often, we don't access a databse
+ end" of an application. Most often, we don't access a database
for the sake
of accessing a database. We use the database as part of a
larger business
@@ -38,7 +38,7 @@
</p>
<p>
- The best thing is use the Action as a thin adaptor between the
+ The best thing is to use the Action as a thin adaptor between
the
web/presentation-tier and your business classes (including
those that
access a database).
@@ -312,12 +312,13 @@
The Struts custom tags can use DynaBean properties as easily
as they use conventional JavaBean properties.
(See
- <strong>DynaActionForm classes</strong>
+ <a
href="../userGuide/building_controller.html#dyna_action_form_classes">
+ DynaActionForm classes</a>
in the Struts User Guide for details.)
</p>
<p>
- Since this is in the BeanUtils jar, you already have it on
+ Since these classes are in the BeanUtils JAR, you already have
it on
board, and just need to implement the transfer routine
(see the ResultSetDynaClass link).
</p>
Modified: struts/struts1/trunk/src/site/xdoc/faqs/validator.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/xdoc/faqs/validator.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/xdoc/faqs/validator.xml (original)
+++ struts/struts1/trunk/src/site/xdoc/faqs/validator.xml Fri Jul 7 15:32:10
2006
@@ -872,7 +872,7 @@
<p>
By convention, the validators your application uses can
- beloaded through a
+ be loaded through a
file named "validator-rules.xml", and the validator forms
(or "validations")
can be configured separately (say, in a "validations.xml"
@@ -1128,7 +1128,7 @@
</subsection>
- <subsection href="validator-bugs" name="Known Bugs">
+ <subsection href="validator-issues" name="Known Issues">
<p>
Since the Struts Validator relies on the Commons
@@ -1140,8 +1140,8 @@
<ul>
<li>
- <a
href="http://issues.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=VERIFIED&bug_severity=Blocker&bug_severity=Critical&bug_severity=Major&bug_severity=Normal&bug_severity=Minor&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=Commons&component=Validator&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Bug+Number">
- Commons Validator Bugzilla Reports</a>
+ <a
href="http://issues.apache.org/jira/browse/VALIDATOR">
+ Commons Validator Issue Tracker (JIRA)</a>
</li>
</ul>
@@ -1179,7 +1179,7 @@
The entry in your Validator configuration would look like
this:
</p>
- <pre>
+ <source>
<![CDATA[
<form name="medicalStatusForm">
@@ -1229,7 +1229,7 @@
</var>
</field>
</form>
-]]></pre>
+]]></source>
<p>
Here's a more complex example using indexed properties.
@@ -1239,7 +1239,7 @@
If you have this in your Struts configuration
</p>
- <pre><![CDATA[
+ <source><![CDATA[
<form-bean
name="dependentlistForm"
type="org.apache.struts.webapp.validator.forms.ValidatorForm">
@@ -1251,7 +1251,7 @@
type="java.lang.Boolean"
initial="false"/>
</form-bean>
-]]></pre>
+]]></source>
<p>
Where dependent is a bean that has properties lastName,
@@ -1263,7 +1263,7 @@
You can define a validation:
</p>
- <pre><![CDATA[
+ <source><![CDATA[
<form name="dependentlistForm">
@@ -1341,7 +1341,7 @@
</form>
-]]></pre>
+]]></source>
<p>
Which is read as follows:
@@ -1391,8 +1391,7 @@
Struts configuration file:
</p>
- <pre>
- <code>
+ <source>
<![CDATA[
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
@@ -1401,8 +1400,7 @@
</plug-in>
]]>
- </code>
- </pre>
+ </source>
</subsection>
@@ -1420,47 +1418,46 @@
<subsection href="resources" name="Validator Resources">
- <p>
+ <ul>
+ <li>
<a
href="http://otn.oracle.com/oramag/oracle/04-jan/o14dev_struts.html">
<strong>Check Your Form with Validator</strong>
</a>
by James Holmes.
Howto article in Oracle Magazine.
- </p>
+ </li>
- <p>
+ <li>
<a
href="http://www.raibledesigns.com/page/rd/20030226#struts_validator_validating_two_fields">
<strong>Struts Validator: Validating Two Fields
Match</strong>
</a>
by Matt Raible.
Howto article.
- </p>
+ </li>
- <p>
+ <li>
<a href="http://www.strutskickstart.com/">
<strong>DynaForms and the Validator</strong>
</a>
by James Turner and Kevin Bedell.
Sample chapter from
<a href="http://www.strutskickstart.com/">Struts
- Kickstart</a>
- ;
+ Kickstart;</a>
available as a free download (PDF).
- </p>
+ </li>
- <p>
- <a
href="http://www.manning.com/getpage.html?project=husted&filename=chapters.html">
+ <li>
+ <a
href="http://www.manning-source.com/books/husted/husted_ch12.pdf">
<strong>Validating user input</strong>
</a>
by David Winterfeldt and Ted Husted.
Sample chapter from
- <a
href="http://www.amazon.com/exec/obidos/ISBN=1930110502/hitchhikeguidetoA/">
- Struts in Action</a>
- ;
+ <a
href="http://www.amazon.com/exec/obidos/ISBN=1930110502/apachesoftwar-20/">
+ Struts in Action;</a>
available as a free download (PDF).
- </p>
-
+ </li>
+ </ul>
</subsection>
</section>
Modified: struts/struts1/trunk/src/site/xdoc/faqs/works.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/xdoc/faqs/works.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/xdoc/faqs/works.xml (original)
+++ struts/struts1/trunk/src/site/xdoc/faqs/works.xml Fri Jul 7 15:32:10 2006
@@ -19,37 +19,41 @@
<document>
<properties>
- <title>How Does It Work?</title>
+ <title>How Does Struts Work?</title>
</properties>
<body>
- <section href="faq" name="How does it work?">
+ <section href="faq" name="How does Struts work?">
- <subsection href="how" name="How does it work?">
+ <subsection href="how" name="How does Struts work?">
+ <blockquote>
<p>
- Java Servlets are designed to handle requests made by Web
+ [From the <a href="kickstart.html#how">Kickstart FAQ</a>]
<br/>
+ <em>"Java Servlets are designed to handle requests made by
Web
browsers.
Server pages are designed to create dynamic Web pages that
- can turn billboard sites into live applications.
+ can turn billboard sites into interactive applications.
Struts uses a special Servlet as a
switchboard to route requests from Web browsers to the
appropriate server page.
This makes Web applications much easier to design, create,
- and maintain.
+ and maintain."</em>
</p>
+ </blockquote>
<p>
- Here is some more detail on the mechanisms and
- dependencies of the framework:
+ That's a good high-level description,
+ but let's describe the mechanisms and
+ dependencies of the framework in more detail.
</p>
<ul>
<li>
+ <p>
The web application that you develop has a deployment
descriptor
- (
- <code>WEB-INF/web.xml</code>
- ) which you must write. This file describes
+ <code>(WEB-INF/web.xml)</code>
+ which you must write. This file describes
the configuration of your web application, including
welcome pages (the
file that is shown in a directory when none is
@@ -57,42 +61,42 @@
mappings to servlets (path or extension name), and
parameters to those
servlets.
- <br/>
-
- In this file, you configure the framework
+ </p>
+ <p>
+ In the <code>web.xml</code> file, you configure the
framework
<a
href="../apidocs/org/apache/struts/action/ActionServlet.html">
<code>ActionServlet</code>
</a>
as the servlet that will handle all requests for a
given mapping (usually
the extension
- <code>.do</code>
- ). This is the "switchboard" mentioned
- above.
- <br/>
-
- In this same file, you configure the
+ <code>.do</code> is used).
+ The ActionServlet is the "switchboard" mentioned in
the
+ opening paragraph.
+ </p>
+ <p>
+ Also in the <code>web.xml,</code> you configure the
<code>ActionServlet</code>
to use
one or more configuration files for Struts itself.
- <br/>
- For this text, assume we are installing the web
- application on the server
- at
- <code>/myapp</code>
- , and are using the simplest possible configuration
+ </p>
+ <p>
+ For now, let's say we are installing the web
+ application on the server using
+ <code>/myapp</code> as a location,
+ and we are using the simplest possible configuration
from there.
- <br/>
-
+ </p>
+ <p>
If you need more details on deployment descriptors,
read
- the Servlet Specification available from Sun
+ the relevant Servlet Specification available from Sun
Microsystem's
- <a href="http://java.sun.com">Java site</a>
- .
- <br/>
+ <a href="http://java.sun.com">Java site.</a>
+ </p>
</li>
<li>
+ <p>
In the framework configuration file(s), you associate
paths with
the controller components of your application, known
@@ -103,39 +107,37 @@
classes (i.e. "login" ==> LoginAction class). This
tells the
<code>ActionServlet</code>
- that when the incoming request is
+ that for the incoming request
<code>http://myhost/myapp/login.do</code>
- it should invoke your
- controller component
- <code>LoginAction</code>
- .
- <br/>
-
+ it should invoke your controller component,
+ <code>LoginAction.</code>
+ </p>
+ <p>
Note the extension
<code>.do</code>
in this URL. The extension causes
your container (i.e. Tomcat) to call the
- <code>ActionServlet</code>
- ,
+ <code>ActionServlet,</code>
which sees the word "login" as the thing you want to
do. The
configuration is referenced, and your
<code>LoginAction</code>
is
executed.
- <br/>
+ </p>
</li>
<li>
+ <p>
For each
- <code>Action</code>
- , you also configure the framework with the names of
+ <code>Action,</code>
+ you also configure the framework with the names of
the resulting page(s) that can be shown as a result of
that action. There
can be more than one view as the result of an action
(often, there are at
- least two: one for success, and one for failure).
- <br/>
-
+ least two: one for "success", and one for "failure").
+ </p>
+ <p>
Your
<code>Action</code>
(the controller component you write) is based on
@@ -153,8 +155,8 @@
of
the view layer by simply editing the XML configuration
file.
- <br/>
-
+ </p>
+ <p>
At this point, the framework knows how to delegate to
your controller components,
and what to show as a result of your controller
@@ -162,25 +164,28 @@
part of the application is completely up to you, and
is called from
within your controller components.
+ </p>
</li>
<li>
- You may also associate a Java Bean with an action (or
+ <p>
+ You may also associate a JavaBean with an action (or
set of actions) in
- the framework's configuration file. The Java Bean is
+ the framework's configuration file. The JavaBean is
used as a repository for
form or display data that can be communicated between
the view and
controller layer.
- <br/>
-
+ </p>
+ <p>
These Beans are automatically made visible to your
controller components
- (like
+ (like the
<code>LoginAction</code>
- ) and any view page that is associated with
+ class)
+ and any view page that is associated with
that controller.
- <br/>
-
+ </p>
+ <p>
These Beans can also be validated with the help of the
framework to
help insure that the user is putting good data in the
@@ -188,10 +193,10 @@
carried along with a session, allowing forms to span
multiple pages of
the view, and Actions in the controller.
- <br/>
-
- <strong>Note</strong>
- : You must be using some sort of server-side
+ </p>
+ <p>
+ <strong>Note:</strong>
+ You must be using some sort of server-side
technology (JSP, Velocity, XSLT) for the view layer
(going
<em>to</em>
@@ -200,15 +205,17 @@
framework works on the
server side, so the client's view has to be composed
there.
- <br/>
-
+ </p>
+ <p>
The client feeds the data back through normal form
submission (POST/GET)
methods, and the framework updates that data in the
Bean before
calling your controller components.
+ </p>
</li>
<li>
+ <p>
Within your web application will be pages that
represent the view your
users will see. These can be JSP pages, Velocity
@@ -219,15 +226,14 @@
can get started right away, but any standard
presentation technology
can be used with the framework.
- <br/>
-
+ </p>
+ <p>
Even plain HTML files can be used within your
application,
although they will not take full advantage of all of
- the dynamic
- features.
- <br/>
-
+ the dynamic features.
+ </p>
+ <p>
Following the example of the Struts JSP taglibs,
several other
packages are available to make the framework easy to
@@ -243,26 +249,26 @@
<a href="http://www.openroad.ca/opencode/">stxx</a>
and
<a href="http://it.cappuccinonet.com/strutscx/">
- StrutsCX</a>
- .
- <br/>
-
+ StrutsCX.</a>
+ </p>
+ <p>
These packages make the standard Struts framework
elements look and
feel like a seamless part of the original presentation
technology.
Struts also makes it easy to mix and match.
If need be, you can use JSP, Velocity templates, and
- XSLT all in
- the same application!
- <br/>
-
+ XSLT all in the same application!
+ </p>
+ <p>
Since Struts relies on standard Servlet technologies,
you should be
able to use any Java presentation technology with
Struts.
+ </p>
</li>
<li>
+ <p>
While the focus of the Struts framework is on the
controller,
the presentation layer is a significant part of any
@@ -270,8 +276,8 @@
The Struts JSP taglibs include a number of generic and
Struts-specific
tags to help you use dynamic data in your view.
- <br/>
-
+ </p>
+ <p>
The custom JSP tags account for a good deal of the
Struts code base. It
is educational to note that as of version 1.1b3 the
@@ -279,8 +285,8 @@
core of Struts was about 28,000 lines, and the Java
code for the tag
libraries (including tiles) was about 41,000 lines.
- <br/>
-
+ </p>
+ <p>
These tags help you glue your view layer to the
controller layer without
having to embed a lot of Java in the JSP. This gives
@@ -289,44 +295,42 @@
than a plain JSP. It
also helps minimize dependencies between the
controller and view.
- <br/>
-
+ </p>
+ <p>
The custom tags are used to create forms (and
invisibly interact with the
Bean mentioned previously), logically forward to other
pages, and invoke
other actions of the web application.
- <br/>
-
+ </p>
+ <p>
There are also tags that help you with
internationalization, error
messages, etc.
- <br/>
-
+ </p>
+ <p>
All of these abilities depend in some way on the
configuration files you
supplied to Struts.
+ </p>
</li>
</ul>
<p>
It is important for you to remember that the mechanism
- described here is
- only in effect when the
+ described here is only in effect when the
<code>ActionServlet</code>
- is handling the
- request.
+ is handling the request.
</p>
<p>
Since this only happens when a request is submitted that
causes your
- container (i.e. Tomcat, WebSphere, etc.) to call
+ container (i.e. Tomcat, WebSphere, whatever) to call
<code>ActionServlet</code>
,
you must be sure that any page that relies on Struts is
- done through a
- request that will map to the
+ done through a request that will map to the
<code>ActionServlet</code>
- (i.e. has a
+ (i.e. it has a
<code>.do</code>
extension).
</p>
Modified: struts/struts1/trunk/src/site/xdoc/userGuide/building_controller.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/xdoc/userGuide/building_controller.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/xdoc/userGuide/building_controller.xml
(original)
+++ struts/struts1/trunk/src/site/xdoc/userGuide/building_controller.xml Fri
Jul 7 15:32:10 2006
@@ -435,7 +435,7 @@
In Struts 1.2.x, Tiles processing required configuring
the framework to use the
<code>TilesRequestProcessor</code>
- implementation. In the SAF 1.3
+ implementation. In the Struts 1.3
<i>Chain</i>
based request processor using Tiles simply
involves configuring it to use an additional Tiles
Modified: struts/struts1/trunk/src/site/xdoc/userGuide/introduction.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/src/site/xdoc/userGuide/introduction.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
--- struts/struts1/trunk/src/site/xdoc/userGuide/introduction.xml (original)
+++ struts/struts1/trunk/src/site/xdoc/userGuide/introduction.xml Fri Jul 7
15:32:10 2006
@@ -97,7 +97,7 @@
</p>
<p>
- The Apache Struts project was launched in May 2000 by
Craig R.
+ The Apache Struts Project was launched in May 2000 by
Craig R.
McClanahan to provide a standard MVC
framework to the Java community. In July 2001, version 1.0
was released, and IOHO, Java
Modified:
struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml
URL:
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml?rev=420001&r1=420000&r2=420001&view=diff
==============================================================================
---
struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml
(original)
+++
struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml
Fri Jul 7 15:32:10 2006
@@ -22,7 +22,7 @@
<!--
This file contains definitions of the standard Chain Of Responsibility
- chains that emulate Struts 1.x processing functionality. These chains
+ chains that emulate Struts 1.2 processing functionality. These chains
are defined in a catalog named "struts" so that the application can
use the default catalog for its own purposes, without any potential for
name clashes.