husted 2002/07/09 15:49:30
Modified: doc/userGuide release-notes.xml preface.xml
building_model.xml
Log:
Routine updates.
Revision Changes Path
1.7 +44 -40 jakarta-struts/doc/userGuide/release-notes.xml
Index: release-notes.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/release-notes.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- release-notes.xml 7 Jul 2002 22:03:00 -0000 1.6
+++ release-notes.xml 9 Jul 2002 22:49:30 -0000 1.7
@@ -85,13 +85,13 @@
<section name="What's New?" href="New">
- <p>Following are highlights of the new features. In the next section, we
+ <p>Following are highlights of the new features. In the next section, we
provide links to the JavaDocs for the affected classes.</p>
<p><strong>New Configuration DTD</strong></p>
- <p> The Struts Configuration 1.0 DTD has been deprecated in favor of the
- <code><a
href="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">struts-config_1_1.dtd</a></code>.
- In the Struts 1.1 release, existing Struts configuration files can be
+ <p> The Struts Configuration 1.0 DTD has been deprecated in favor of the
+ <code><a
href="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">struts-config_1_1.dtd</a></code>.
+ In the Struts 1.1 release, existing Struts configuration files can be
loaded using either DTD version.
</p>
@@ -109,7 +109,7 @@
<p>The following Commons packages contain the replacements for the
corresponding Struts 1.0 classes:</p>
<ul>
- <li><strong>BeanUtils Package</strong>
+ <li><strong>BeanUtils Package</strong>
[<a
href="http://jakarta.apache.org/commons/beanutils.html"><code>org.apache.commons.beanutils</code></a>]
-
<code>org.apache.struts.utils.BeanUtils</code>,
<code>org.apache.struts.utils.ConvertUtils</code>, and
@@ -124,45 +124,45 @@
[<a
href="http://jakarta.apache.org/commons/digester.html"><code>org.apache.commons.digester</code></a>]
-
<code>org.apache.struts.digester.*</code>.</li>
</ul>
- <p>The following Commons packages are also now used by various components
+ <p>The following Commons packages are also now used by various components
of the Struts framework:</p>
<ul>
- <li><strong>Database Connection Pool Package</strong>
+ <li><strong>Database Connection Pool Package</strong>
[<a
href="http://jakarta.apache.org/commons/dbcp.html"><code>org.apache.commons.dbpc</code></a>]</li>
- <li><strong>Logging Package</strong>
+ <li><strong>Logging Package</strong>
[<a
href="http://jakarta.apache.org/commons/logging.html"><code>org.apache.commons.logging</code></a>]</li>
- <li><strong>Pool Package</strong>
+ <li><strong>Pool Package</strong>
[<a
href="http://jakarta.apache.org/commons/pool/index.html"><code>org.apache.commons.pool</code></a>]</li>
- <li><strong>Services Package</strong>
+ <li><strong>Services Package</strong>
[<a
href="http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/services/"><code>org.apache.commons.services</code></a>]</li>
- <li><strong>Validator Package</strong>
+ <li><strong>Validator Package</strong>
[<a
href="http://cvs.apache.org/viewcvs/jakarta-commons/validator/"><code>org.apache.commons.validator</code></a>]</li>
</ul>
<p><strong>NOTE! XML Parser Prerequisite Updated</strong></p>
- <p>Struts now depends on an XML parser that conforms to the JAXP/1.1
- (rather than JAXP/1.0) APIs. Parsers known to work include the JAXP/1.1
+ <p>Struts now depends on an XML parser that conforms to the JAXP/1.1
+ (rather than JAXP/1.0) APIs. Parsers known to work include the JAXP/1.1
reference implementation, and Xerces 1.3.1.</p>
- <p><strong>SOURCE DEVELOPERS NOTE! Ant Prerequiste Updated</strong></p>
- <p>To build Struts from source Ant 4.0 or later is now required. This
+ <p><strong>SOURCE DEVELOPERS NOTE! Ant Prerequiste Updated</strong></p>
+ <p>To build Struts from source Ant 4.0 or later is now required. This
does not affect developers that use Struts from the binary distribution.</p>
<p><strong>Struts Validator Integration</strong></p>
- <p>The new Commons-Validator is now integrated with Struts and exposed
+ <p>The new Commons-Validator is now integrated with Struts and exposed
through the new Validator package.</p>
<p><strong>Tiles - An advanced templating taglib</strong></p>
<p>The Tiles JSP assembly framework has been integrated with Struts.</p>
<p><strong>Nested - An very cool taglib extension</strong></p>
- <p>The Nested taglib is bundled with Struts and enhances the functionality
+ <p>The Nested taglib is bundled with Struts and enhances the functionality
of the existing Struts tags.</p>
<p><strong>New Example Applications</strong></p>
- <p>New example applications for the Validator and Tiles are now part
+ <p>New example applications for the Validator and Tiles are now part
of the Struts distribution.</p>
<p><strong>New Contrib directory for optional compoonents</strong></p>
@@ -175,18 +175,18 @@
<li>Scaffold - Library of reusable classes for building web applications.</li>
<li>Service Manager - Add custom services without subclassing controller.</li>
</ul>
- </p>
+ </p>
- <p>The source for these components is available in the Struts source
- distribution. Binary distributions may also be made available with the Struts
- download area. As optional components, these products have their own
+ <p>The source for these components is available in the Struts source
+ distribution. Binary distributions may also be made available with the Struts
+ download area. As optional components, these products have their own
release cycles.</p>
<p><strong>Action Package Additions</strong></p>
<p>The following new features have been added to the basic controller
framework (package <code>org.apache.struts.action</code>):</p>
<ul>
- <li>The ActionServlet now provides support for modular Struts applications and
+ <li>The ActionServlet now provides support for modular Struts applications and
sports several new extension points.</li>
<li>The new <code>ActionMessages</code> class will support a superset of
the capabilities of <code>ActionErrors</code>, and will be useful as
@@ -206,7 +206,7 @@
<p><strong>Bean Taglib Package Additions</strong></p>
<p>The following new features have been added to the
- <em>struts-bean</em> custom tag library
+ <em>struts-bean</em> custom tag library
[<code>org.apache.struts.taglib.bean</code>]:</p>
<ul>
<li><code><bean:write></code>: Add format, locale and bundle attributes to
to support formatting values according to current
@@ -232,7 +232,7 @@
<p>The following new features have been added to the
<em>struts-logic</em> custom tag library
[<code>org.apache.struts.taglib.logic</code>]:</p>
<ul>
- <li><code><logic:empty></code> and
+ <li><code><logic:empty></code> and
<code><logic:notEmpty></code>: New tags that are similar to
<code><logic:present></code> and
<code><logic:notPresent></code> except for the treatment of
@@ -241,7 +241,7 @@
<p><strong>Template Taglib Package Additions</strong></p>
<p>The following new features have been added to the
- <em>struts-template</em> custom tag library
+ <em>struts-template</em> custom tag library
[<code>org.apache.struts.taglib.template</code>]:</p>
<ul>
<li>None.</li>
@@ -277,12 +277,13 @@
</ul>
<p><strong>Added Config Package</strong></p>
<ul>
- <li>Various classes to support modular applications</li>
+ <li>Various classes to provide more flexibility in configuring the controller
and to provide support for modular applications</li>
</ul>
<p><strong>Action Package Changes</strong></p>
<p>The following changes and bug fixes have occurred in the basic
controller framework (package <code>org.apache.struts.action</code>):</p>
<ul>
+ <li>ActionMapping: input property may now refer to an ActionForward rather than
a module-relative path if inputForward is set to true on the module's ControllerConfig
bean [org.apache.struts.config.ControllerConfig.
<li>ActionServlet: Added convertNull parameter to simulate the Struts 1.0
behavior when populating forms. If set to true, the numeric Java wrapper class types
(like java.lang.Integer) will default to null (rather than 0).</li>
<li>ActionServlet: Added "config/$foo" parameter and deprecated several others
in favor of components in the new config package. </li>
<li>ActionForms and related classes: now use a StringBuffer when responding a
toString request in order to conserve resources.</li>
@@ -315,11 +316,14 @@
<p>The following changes and bug fixes have occurred in the utilities
(package <code>org.apache.struts.util</code>):</p>
<ul>
+ <li>GenericDataSource: Deprecated and modified to act as a thin wrapper around
+ [<code>org.apache.commons.dbpc.BasicDataSource</code>].
+ Replaced by direct use of BasicDataSource or other compatible component.</li>
<li>RequestUtils class: Modify to use ActionServletWrapper rather than expose
ActionServlet.</li>
<li>Added error message for the getActionErrors and getActionMessages
method.</li>
- <li>getActionErrors and getActionMessages: Added methods to generate the
correct corresponding
+ <li>getActionErrors and getActionMessages: Added methods to generate the
correct corresponding
object based on the object retrieved from request scope based on the key passed
in.</li>
- <li>ActionErrors or ActionMessages: The logic for creating one of these objects
has been moved
+ <li>ActionErrors or ActionMessages: The logic for creating one of these objects
has been moved
to a utility method in RequestUtils.</li>
<li>JspException message: Now generated in RequestUtils.</li>
<li>ConvertUtils.convertCharacter(): Will now detect empty strings and return
the default value.</li>
@@ -327,7 +331,7 @@
<p><strong>Bean Taglib Package Changes</strong></p>
<p>The following changes and bug fixes have occured in the
- <em>struts-bean</em> custom tag library
+ <em>struts-bean</em> custom tag library
[<code>org.apache.struts.taglib.bean</code>]:</p>
<ul>
<li><html:errors>: When the property tag is
@@ -335,7 +339,7 @@
has no errors. Previously errors were always printed ! Future
enhancements would include additional attributes to always turn
off the header or footer. </li>
- <li>Made the remaining helper methods "protected" rather than
+ <li>Made the remaining helper methods "protected" rather than
"private".</li>
</ul>
@@ -383,7 +387,7 @@
Application have occurred:</p>
<ul>
<li>None.</li>
- </ul>
+ </ul>
<p><strong>Exercise Taglib Example Application Changes</strong></p>
<p>The following changes and bug fixes to the Struts Excercise Taglib Example
@@ -391,7 +395,7 @@
<ul>
<li>Added test case for <html:select> using <html:options> based on a
collection
saved in the page context.</li>
- </ul>
+ </ul>
</section>
@@ -403,20 +407,20 @@
<p><strong>Previously deprecated classes and packages removed in Struts
1.1</strong></p>
<ul>
- <li>Removed:
- <code>org.apache.struts.utils.BeanUtils</code>,
+ <li>Removed:
+ <code>org.apache.struts.utils.BeanUtils</code>,
<code>org.apache.struts.utils.ConvertUtils</code>, and
- <code>org.apache.struts.utils.PropertyUtils</code> - replaced by
+ <code>org.apache.struts.utils.PropertyUtils</code> - replaced by
<a href
="http://jakarta.apache.org/commons/beanutils.html"><code>org.apache.commons.beanutils</code></a>
</li>
- <li>Removed:
+ <li>Removed:
<code>org.apache.struts.util.ArrayStack</code>,
<code>org.apache.struts.util.FastArrayList</code>,
<code>org.apache.struts.util.FastHashMap</code>,
- <code>org.apache.struts.util.FastTreeMap</code> - replaced by
+ <code>org.apache.struts.util.FastTreeMap</code> - replaced by
<a href
="http://jakarta.apache.org/commons/collections.html"><code>org.apache.commons.collections</code></a>
</li>
- <li>Removed: <code>org.apache.struts.digester.*</code> - replaced by
+ <li>Removed: <code>org.apache.struts.digester.*</code> - replaced by
<a href
="http://jakarta.apache.org/commons/digester.html"><code>org.apache.commons.digester</code></a>
</li>
<li>Removed: The <code>struts-config.dtd</code> - Replaced by <a
href="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><code>struts-config_1_1.dtd</code></a>.</li>
@@ -548,7 +552,7 @@
<p>Next: <a href="installation.html">Installation</a></p>
-</section>
+</section>
</body>
1.4 +122 -80 jakarta-struts/doc/userGuide/preface.xml
Index: preface.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/preface.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- preface.xml 2 Jul 2002 15:12:07 -0000 1.3
+++ preface.xml 9 Jul 2002 22:49:30 -0000 1.4
@@ -14,8 +14,8 @@
<section name="0.1 The Usual Suspects" href="prereqs">
<p>
- This User Guide is written for active web developers and assumes a working
- knowledge about how Java web applications work. Before getting started, you
should
+ This User Guide is written for active web developers and assumes a working
+ knowledge about how Java web applications work. Before getting started, you
should
understand the basics of several core technologies:
</p>
@@ -30,46 +30,46 @@
<li><a href="#xml">Extensible Markup Language</a></li>
</ul>
- <p>This chapter briefly defines each of these technologies, but does not
describe them in
- detail. For your convenience, links to further information about each component
are also
+ <p>This chapter briefly defines each of these technologies, but does not
describe them in
+ detail. For your convenience, links to further information about each component
are also
provided.</p>
- <p><a target="#jwst"></a>If you are familiar with Java, but not these
technologies,
- the best overall starting point is
+ <p><a target="#jwst"></a>If you are familiar with Java, but not these
technologies,
+ the best overall starting point is
<a href="http://java.sun.com/webservices/docs/1.0/tutorial/index.html"><b>The
Java Web Services Tutorial</b></a>.
- This is also available for download as a
+ This is also available for download as a
<a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/JavaWSTutorial.pdf">PDF</a>.
</p>
- <p>If you've created web applications for other platforms, you may able to
follow along
- and visit the other references as needed. The core technologies used by Struts
are
- also used by most other Java web development products, so the background
information will be
+ <p>If you've created web applications for other platforms, you may able to
follow along
+ and visit the other references as needed. The core technologies used by Struts
are
+ also used by most other Java web development products, so the background
information will be
useful in any Java project.
</p>
- <p><a target="#jt"></a>If you are not familiar with the Java language
generally,
+ <p><a target="#jt"></a>If you are not familiar with the Java language generally,
then the best start starting point is
- <a href="http://java.sun.com/docs/books/tutorial/index.html"><b>The Java
Tutorial</b></a>.
- This overlaps with the Java Web Services Tutorial in some places, but the two
work well together.
+ <a href="http://java.sun.com/docs/books/tutorial/index.html"><b>The Java
Tutorial</b></a>.
+ This overlaps with the Java Web Services Tutorial in some places, but the two
work well together.
</p>
</section>
<section name="0.2 HTTP, HTML and User Agents" href="http">
- <p>The World Wide Web was built over the Hypertext Transfer Protocol
- (<a href="http://www.ietf.org/rfc/rfc2616.txt?number=2616">HTTP</a>) and the
Hypertext Markup Language
- (<a href="http://www.w3.org/MarkUp/">HTML</a>). A User Agent, like a web
browser, uses HTTP to request
- a HTML document. The browser then formats and displays the document to its
user. HTTP is used to
+ <p>The World Wide Web was built over the Hypertext Transfer Protocol
+ (<a href="http://www.ietf.org/rfc/rfc2616.txt?number=2616">HTTP</a>) and the
Hypertext Markup Language
+ (<a href="http://www.w3.org/MarkUp/">HTML</a>). A User Agent, like a web
browser, uses HTTP to request
+ a HTML document. The browser then formats and displays the document to its
user. HTTP is used to
transport more than HTML, but HTML is the lingua franca of the Web and web
applications. </p>
- <p>Some Java engineers working web applications write their own HTML. Others
leave that to the
+ <p>Some Java engineers working web applications write their own HTML. Others
leave that to the
page designers.</p>
<p>For more about HTTP, HTML, and User Agents, see:</p>
<ul>
- <li><a href="http://www.w3.org/MarkUp/Guide/"><b>Getting started with
HTML</b></a> by Dave Raggett</li>
+ <li><a href="http://www.w3.org/MarkUp/Guide/"><b>Getting started with
HTML</b></a> by Dave Raggett</li>
<li><a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/HTTP.html#63796">
<b>HTTP Overview</b></a> in the Java Web Services Tutorial.</li>
</ul>
@@ -77,13 +77,13 @@
<section name="0.3 The HTTP Request/Response cycle" href="cycle">
- <p>A very important part of HTTP for the web developer is the request/response
cycle. To use HTTP
- you have to make a request. A HTTP server, like a web server, is then obliged
to respond. When you
+ <p>A very important part of HTTP for the web developer is the request/response
cycle. To use HTTP
+ you have to make a request. A HTTP server, like a web server, is then obliged
to respond. When you
build your web application, you design it to react to a HTTP request by
returning a HTTP response.
- Frameworks like Struts abstract much of these nuts and bolts, but it is
important to understand
+ Frameworks like Struts abstract much of these nuts and bolts, but it is
important to understand
what is happening behind the scenes. </p>
- <p>If you are not familiar with the HTTP Request/Response cycle, we
<b>strongly</b> recommend the
+ <p>If you are not familiar with the HTTP Request/Response cycle, we
<b>strongly</b> recommend the
<a href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/HTTP.html#63796">
HTTP Overview</a> in the JWST.
</p>
@@ -92,10 +92,10 @@
<section name="0.4 The Java Language and Application Frameworks" href="java">
- <p>Struts is written in the popular and versatile
- <a href="http://java.sun.com/docs/books/jls/first_edition/html/index.html">Java
programming language</a>.
- Java is an object-orientated language, and Struts makes good use of many
object-orientated techniques.
- A good understanding of Java, and especially object-orientated programming
(OOP) will help
+ <p>Struts is written in the popular and versatile
+ <a href="http://java.sun.com/docs/books/jls/first_edition/html/index.html">Java
programming language</a>.
+ Java is an object-orientated language, and Struts makes good use of many
object-orientated techniques.
+ A good understanding of Java, and especially object-orientated programming
(OOP) will help
you get the most out of Struts and this User Guide. </p>
<p>For more about Java and OOP, see </p>
@@ -104,19 +104,19 @@
<li><a
href="http://java.sun.com/docs/books/tutorial/java/index.html"><b>Learning the Java
Language</b></a> in the Java Tutorial</li>
</ul>
- <p>Even if you have worked with Java and OOP before, it can also help to be
aware of the
- programming challenges specific to creating and using application frameworks.
For more about application
+ <p>Even if you have worked with Java and OOP before, it can also help to be
aware of the
+ programming challenges specific to creating and using application frameworks.
For more about application
frameworks, see the classic white papers</p>
<ul>
<li><a href="http://www.laputan.org/drc/drc.html"><b>Designing Reusable
Classes</b></a> by Ralph E. Johnson & Brian Foote</li>
- <li><a
href="http://www.cs.wustl.edu/~schmidt/CACM-frameworks.html"><b>Object-Oriented
Application Frameworks</b></a>
+ <li><a
href="http://www.cs.wustl.edu/~schmidt/CACM-frameworks.html"><b>Object-Oriented
Application Frameworks</b></a>
by Mohamed Fayad and Douglas C. Schmidt</li>
</ul>
- <p>These papers can be especially helpful if you are
- <a href="http://www.waferproject.org/index.html">fact-finding or reviewing</a>
- server-side
+ <p>These papers can be especially helpful if you are
+ <a href="http://www.waferproject.org/index.html">fact-finding or reviewing</a>
+ server-side
<a
href="http://directory.google.com/Top/Computers/Programming/Languages/Java/Server-Side/Libraries_and_Frameworks/">frameworks</a>.
</p>
@@ -124,15 +124,15 @@
<section name="0.5 JavaBeans" href="javabeans">
- <p>Like many Java applications, most of the Struts objects are designed as
- <a href="http://java.sun.com/products/javabeans/">JavaBeans</a>. Following the
JavaBean design patterns makes
+ <p>Like many Java applications, most of the Struts objects are designed as
+ <a href="http://java.sun.com/products/javabeans/">JavaBeans</a>. Following the
JavaBean design patterns makes
the Struts classes easier to use -- both by Java developers and by Java
development tools. </p>
- <p>Although JavaBeans were first created for visual elements, these object
design patterns have been found to
+ <p>Although JavaBeans were first created for visual elements, these object
design patterns have been found to
be useful as the basis for any reusable component, like those used by the
Struts framework.</p>
<p>For more about JavaBeans, see</p>
-
+
<ul>
<li><a
href="http://java.sun.com/docs/books/tutorial/javabeans/index.html"><b>The JavaBean
Trail</b></a> in the Java Tutorial</li>
<li><a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPBeans.html"><b>JavaBeans
Components in JSP Pages</b></a> in the Java Web Services Tutorial</li>
@@ -140,12 +140,30 @@
</section>
+ <section name="0.5.1 Reflection" href="reflection">
+
+ <p>[:TODO:]</p>
+
+ </section>
+
+ <section name="0.5.2 Maps" href="Maps">
+
+ <p>[:TODO:]</p>
+
+ </section>
+
+ <section name="0.5.3 DynaBeans" href="dynabeans">
+
+ <p>[:TODO:]</p>
+
+ </section>
+
<section name="0.6 Properties files and ResourceBundles" href="resources">
- <p>Java applications, including web applications, are often configured using
- <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/Properties.html">Properties</a>
- files. Properties files are the basis for the
- <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html">ResourceBundles</a>
that Struts uses to provide messages resources
+ <p>Java applications, including web applications, are often configured using
+ <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/Properties.html">Properties</a>
+ files. Properties files are the basis for the
+ <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html">ResourceBundles</a>
that Struts uses to provide messages resources
to an application. </p>
<p>For more about Properties files, see: </p>
@@ -155,9 +173,9 @@
<b>Using Properties to Manage Program Attributes</b></a> in The Java
Tutorial</li>
</ul>
- <p>Java ResourceBundles use one or more Properties files to provide
internationalized messages
- to users based their
- <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/Locale.html">Locale</a>.
+ <p>Java ResourceBundles use one or more Properties files to provide
internationalized messages
+ to users based their
+ <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/Locale.html">Locale</a>.
Support for localizing an application was built into Struts from the
ground-up.</p>
<p>For more about localization and ResourceBundles, see </p>
@@ -167,41 +185,53 @@
in the Java Tutorial</li>
</ul>
- </section>
-
+ </section>
+
<section name="0.7 Java Servlets" href="servlets">
- <p>Much of the <a href="#cycle">HTTP Request/Response cycle</a> nuts-and-bolts
are handled by Sun's
- <a href="http://java.sun.com/products/servlet/">Java Servlet</a> platform. This
casts HTTP
- into an object-orientated form so that developers can better concentrate what
+ <p>Much of the <a href="#cycle">HTTP Request/Response cycle</a> nuts-and-bolts
are handled by Sun's
+ <a href="http://java.sun.com/products/servlet/">Java Servlet</a> platform. This
casts HTTP
+ into an object-orientated form so that developers can better concentrate what
they need their application to do -- rather than the mechanics of HTTP.</p>
- <p>Struts provides a ready-to-use servlet for your application. As a Struts
developer, you
- can then just write objects that the Struts servlet calls when needed. But it
is still
- helpful to understand the basics of what servlets are and the role they play in
a Java
+ <p>Struts provides a ready-to-use servlet for your application. As a Struts
developer, you
+ can then just write objects that the Struts servlet calls when needed. But it
is still
+ helpful to understand the basics of what servlets are and the role they play in
a Java
web application.</p>
<p>For more about Java Servlets, see </p>
<ul>
- <li><a href=""><b>Java Servlet Technology</b></a> in the Java Web
+ <li><a href=""><b>Java Servlet Technology</b></a> in the Java Web
Services Tutorial.</li>
</ul>
- </section>
+ </section>
+
+ <section name="0.7.1 Java Servlet Contexts" href="contexts">
+
+ <p>[:TODO:]</p>
+
+ </section>
+
+ <section name="0.7.2 Java Servlet Forwards" href="forwards">
+
+ <p>[:TODO:]</p>
+
+ </section>
<section name="0.8 JavaServer Pages and JSP Tag Libraries" href="jsp">
- <p><a href="http://java.sun.com/products/jsp/product.html">JavaServer Pages</a>
(JSPs) are
- "inside-out servlets" that make it easier to create and maintain dynamic web
pages. Instead
- of putting what you want to write to the HTTP response inside of a Java
<code>print</code>
- statement, everything in a JavaServer Page is written to the response,
<b>except</b> what is
+ <p><a href="http://java.sun.com/products/jsp/product.html">JavaServer Pages</a>
(JSPs) are
+ "inside-out servlets" that make it easier to create and maintain dynamic web
pages. Instead
+ of putting what you want to write to the HTTP response inside of a Java
<code>print</code>
+ statement, everything in a JavaServer Page is written to the response,
<b>except</b> what is
placed within special Java statements.</p>
- <p>With JavaServer Pages you can start by writing the page in standard HTML and
then add the
- dynamic features using statements in the Java language or by using
- <a href="http://java.sun.com/products/jsp/taglibraries.html">JSP tags</a>.
- The Struts distribution includes several JSP tags that make it easy to access
the framework's
+ <p>With JavaServer Pages you can start by writing the page in standard HTML and
then add the
+ dynamic features using statements in the Java language or by using
+ <a href="http://java.sun.com/products/jsp/taglibraries.html">JSP tags</a>.
+ The Struts distribution includes several JSP tags that make it easy to access
the framework's
features from a JavaServer Page.</p>
-
+
<p>For more about JavaServerPages and JSP Tag Libraries see </p>
<ul>
@@ -209,30 +239,30 @@
<li><a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPTags.html"><b>Custom
Tags in JSP Pages</b></a> in the Java Web Services Tutorial</li>
</ul>
- <p>Many times, JSP tags work hand-in-hand with JavaBeans. The application sends
a JavaBean to
- the JSP, and the JSP tag uses the bean to customize the page for the instant
user. For more, see
+ <p>Many times, JSP tags work hand-in-hand with JavaBeans. The application sends
a JavaBean to
+ the JSP, and the JSP tag uses the bean to customize the page for the instant
user. For more, see
<a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPBeans.html">JavaBeans
Components in JSP Pages</a>
in the Java Web Services Tutorial.</p>
- <p>Struts also works well with the new
+ <p>Struts also works well with the new
<a href="http://java.sun.com/products/jsp/jstl">Java Standard Tag Library</a>
- and taglibs from other sources, like
- <a href="http://jsptags.com/">JSP Tags</a> and
+ and taglibs from other sources, like
+ <a href="http://jsptags.com/">JSP Tags</a> and
<a href="http://jakarta.apache.org/taglibs/index.html">Jarkata Taglibs</a>.
</p>
- <p>There are also toolkits available that make Struts easy to use with
- <a href="http://www.openroad.ca/opencode/">XSLT</a> and
+ <p>There are also toolkits available that make Struts easy to use with
+ <a href="http://www.openroad.ca/opencode/">XSLT</a> and
<a href="http://jakarta.apache.org/velocity/index.html">Velocity Templates</a>.
</p>
-
- </section>
+
+ </section>
<section name="0.9 Extensible Markup Language (XML)" href="xml">
- <p>The features provided by the Struts framework relies on a number of objects
that are
- usually deployed using files writing in
- <a href="http://www.w3.org/XML/">Extensible Markup Language</a>. XML is also
used to
+ <p>The features provided by the Struts framework relies on a number of objects
that are
+ usually deployed using files writing in
+ <a href="http://www.w3.org/XML/">Extensible Markup Language</a>. XML is also
used to
configure Java web applications; so, this is yet another familiar approach.
</p>
@@ -242,17 +272,29 @@
<li><a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/WebApp4.html#64678">Configuring
Web Applications</a> in the Java Web Services Tutorial</li>
</ul>
- <p>For more about how XML is used with Java applications generally, see
- <a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPIntro.html">Java API
for XML Processing</a> in the Java Web Services Tutorial.
- While the framework makes good use of this API internally, it is not something
most Struts developers
+ <p>For more about how XML is used with Java applications generally, see
+ <a
href="http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPIntro.html">Java API
for XML Processing</a> in the Java Web Services Tutorial.
+ While the framework makes good use of this API internally, it is not something
most Struts developers
would use when writing their own applications.</p>
+ <section name="0.9.1 Descriptors" href="descriptors">
+
+ <p>[:TODO:]</p>
+
+ </section>
+
+ <section name="0.10 JAAS" href="jaas">
+
+ <p>[:TODO:]</p>
+
+ </section>
+
<p align="center">
Next: <a href="introduction.html">Introduction</a>
</p>
-
+
</section>
-
+
</chapter>
</body>
</document>
1.11 +70 -71 jakarta-struts/doc/userGuide/building_model.xml
Index: building_model.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_model.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- building_model.xml 29 Jun 2002 14:12:01 -0000 1.10
+++ building_model.xml 9 Jul 2002 22:49:30 -0000 1.11
@@ -9,12 +9,12 @@
<author>Ed Burns</author>
<title>The Struts User's Guide - Building Model Components</title>
</properties>
-
- <body>
+
+ <body>
<chapter name="2. Building Model Components" href="building_model">
-
+
<section name="2.1 Overview" href="overview">
-
+
<p>
Many requirements documents used for building web applications
focus on the <i>View</i>. However, you should ensure that the
@@ -30,9 +30,9 @@
beans and JSP is useful first.
</p>
</section>
-
+
<section name="2.2 JavaBeans and Scope" href="javabeans">
-
+
<p>
Within a web-based application, JavaBeans can be stored in (and accessed
from) a number of different collections of "attributes". Each collection
@@ -42,7 +42,7 @@
Pages (JSP) Specification defines scope choices using the following terms
(with the equivalent servlet API concept defined in parentheses):
</p>
-
+
<ul>
<li><b>page</b> - Beans that are visible within a single JSP page,
for the lifetime of the current request. (Local variables of
@@ -57,34 +57,34 @@
servlets that are part of a web application. (Servlet context
attributes)</li>
</ul>
-
+
<p>
It is important to remember that JSP pages and servlets in the same
web application share the same sets of bean collections. For example,
a bean stored as a request attribute in a servlet like this:
</p>
-
+
<p><code>MyCart mycart = new MyCart(...);<br />
request.setAttribute("cart", mycart);
</code></p>
-
+
<p>
is immediately visible to a JSP page which this servlet forwards to,
using a standard action tag like this:
</p>
-
+
<p><code><jsp:useBean id="cart" scope="request"<br />
class="com.mycompany.MyApp.MyCart"/>
</code></p>
</section>
-
+
<section name="2.3 ActionForm Beans" href="actionform">
-
+
<blockquote>
- <b>Note:</b> While ActionForm beans often have properties that correspond
- to properties in your Model beans, the form beans themselves should
- be considered a Controller component. As such, they are able to
- transfer data between the Model and View layers.
+ <b>Note:</b> While ActionForm beans often have properties that correspond
+ to properties in your Model beans, the form beans themselves should
+ be considered a Controller component. As such, they are able to
+ transfer data between the Model and View layers.
</blockquote>
<p>
The Struts framework generally assumes that you have defined an
@@ -92,17 +92,17 @@
<code>ActionForm</code> class) for the input forms in your
application. <code>ActionForm</code> beans are sometimes just called
"form beans". These may be finely-grained objects, so that there is one
- bean for each form, or coarsely-grained so that one bean serves
+ bean for each form, or coarsely-grained so that one bean serves
several forms, or even an entire application.
</p>
<p>
- If you declare such beans in your Struts
+ If you declare such beans in your Struts
configuration file (see "<a href="building_controller.html#config">
- Building the Controller Components</a>"), the Struts controller servlet
- will automatically perform the following services for you, before
+ Building the Controller Components</a>"), the Struts controller servlet
+ will automatically perform the following services for you, before
invoking the appropriate <code>Action</code> method:
</p>
-
+
<ul>
<li>Check in the user's session for an instance of a bean of the
appropriate class, under the appropriate key.</li>
@@ -114,17 +114,17 @@
JSP action <code><jsp:setProperty></code> when you use the
asterisk wildcard to select all properties.</li>
<li>The updated <code>ActionForm</code> bean will be passed to the
- <code>execute</code> method of an <code>Action</code> class
- [<code>org.apache.struts.Action</code>], so that the values can
+ <code>execute</code> method of an <code>Action</code> class
+ [<code>org.apache.struts.Action</code>], so that the values can
be made available to your system state and business logic beans.</li>
</ul>
-
+
<p>
- For more about coding <code>Actions</code> and <code>ActionForm</code>
- beans, see the "<a href="building_controller.html">Building
- Controller Components</a>" chapter.
+ For more about coding <code>Actions</code> and <code>ActionForm</code>
+ beans, see the "<a href="building_controller.html">Building
+ Controller Components</a>" chapter.
</p>
-
+
<p>
You should note that a "form", in the sense discussed here, does not
necessarily correspond to a single JSP page in the user interface. It is
@@ -135,23 +135,23 @@
properties for all of the fields, no matter which page the field is actually
displayed on. Likewise, the various pages of the same form should all be
submitted to the same Action Class. If you follow these suggestions, the
- page designers can rearrange the fields among the various pages, often
without
+ page designers can rearrange the fields among the various pages, often
without
requiring changes to the processing logic.
</p>
<p>
- Smaller applications may only need a single ActionForm to service all of
- its input forms. Others applications might use a single ActionForm for each
- major subsystem of the application. Some teams might prefer to have a
- separate ActionForm class for each distinct input form or workflow. How
many
- or how few ActionForms to use is entirely up to you. The framework doesn't
- care.
+ Smaller applications may only need a single ActionForm to service all of
+ its input forms. Others applications might use a single ActionForm for each
+ major subsystem of the application. Some teams might prefer to have a
+ separate ActionForm class for each distinct input form or workflow. How many
+ or how few ActionForms to use is entirely up to you. The framework doesn't
+ care.
</p>
</section>
-
+
<section name="2.4 System State Beans" href="system_state">
-
+
<p>
The actual state of a system is normally represented as a set of one or
more JavaBeans classes, whose properties define the current state. A
@@ -163,7 +163,7 @@
addresses), as well as the catalog of available items and their current
inventory levels.
</p>
-
+
<p>
For small scale systems, or for state information that need not be kept
for a long period of time, a set of system state beans may contain all the
@@ -175,9 +175,9 @@
JavaBeans are also used for this purpose in large scale applications.
</p>
</section>
-
+
<section name="2.5 Business Logic Beans" href="business_logic">
-
+
<p>
You should encapsulate the functional logic of your application as
method calls on JavaBeans designed for this purpose. These methods may
@@ -186,7 +186,7 @@
case, you will usually need to pass the system state beans to be manipulated
to these methods as arguments.
</p>
-
+
<p>
For maximum code re-use, business logic beans should be designed and
implemented so that they do <b>not</b> know they are being executed in a
@@ -200,7 +200,7 @@
can be made. Such a business logic class can be reused in environments
other than the web application for which they were initially constructed.
</p>
-
+
<p>
Depending on the complexity and scope of your application, business logic
beans might be ordinary JavaBeans that interact with system state beans
@@ -209,37 +209,37 @@
or stateless Enterprise JavaBeans (EJBs) instead.
</p>
</section>
-
+
<section name="2.6 Accessing Relational Databases" href="databases">
<p>
- Ideally, the business logic beans should encapsulate the data access
- details, including acquiring a database connection. However, some
+ Ideally, the business logic beans should encapsulate the data access
+ details, including acquiring a database connection. However, some
application designs expect that the caller able to provide a
- with a database connection or datasource instance. When this is the
- case, the Struts datasource manager can make it easy for your Action
- to produce these resources on demand.
- </p>
- <p>
- The Struts datasource manager is configured as an element in the
- Struts configuration file (struts-config.xml). The manager can
- used to deploy any connection pool that implements the
+ with a database connection or datasource instance. When this is the
+ case, the Struts datasource manager can make it easy for your Action
+ to produce these resources on demand.
+ </p>
+ <p>
+ The Struts datasource manager is configured as an element in the
+ Struts configuration file (struts-config.xml). The manager can
+ used to deploy any connection pool that implements the
<code>javax.sql.DataSource</code> interface and is configurable totally
- from JavaBean properties. If your DBMS or container provides a
- connection pool that meets these requirements, then that component
- might your first choice.
+ from JavaBean properties. If your DBMS or container provides a
+ connection pool that meets these requirements, then that component
+ might your first choice.
</p>
<p>
- Otherwise, the Struts distribution includes a Generic DataSource pool
- [org.apache.struts.util.GenericDataSource]
- that works well with the datasource manager. If another component
- is not specified, the Generic DataSource pool is used by default.
- See <a href="building_controller.html#config">The Struts
- Configuration File</a> section and the <a href="dev_utils">Utilities
- Developer Guide</a> for more detail.
+ The Jakarta Commons dbcp's BasicDataSource
+ [org.apache.commons.dbcp.BasicDataSource] also works well with the
+ datasource manager, if a native component is not available. The Struts
+ distribution includes a Generic DataSource class in its util
+ package, but this is now only a wraper around the BasicDataSource. The
+ GenericDataSource class is deprecated as of Struts 1.1 and replaced by
+ direct use of the BasicDataSource.
</p>
<p>
- After the datasource is defined, here is an example of using the
+ After the datasource is defined, here is an example of using the
manger to establishing a connection from within an Action's
<code>execute</code> method.
</p>
<pre>
@@ -247,7 +247,7 @@
execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
- HttpServletResponse response) throws Exception
+ HttpServletResponse response) throws Exception
{
javax.sql.DataSource dataSource;
java.sql.Connection myConnection;
@@ -271,12 +271,11 @@
}
}
</pre>
-
+
<p>
- Note that the Struts connection pool
[<code>org.apache.struts.util.GenericDataSource</code>]
- has <b>not</b> been optimized for performance. Many Struts applications use
other connection
- pools, especially with high-volume production systems. If your DBMS or
container
- provides a connection pool of its own, that may be a better choice.
+ Note that you can define as many datasource objects as your application
requires and
+ refer to each using a logical name. This can be useful in proding better
security or
+ scalability, or even to test datasource implementations against each other.
</p>
<p align="center">
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>