husted 2002/10/13 08:55:12
Modified: doc/userGuide installation.xml building_view.xml
building_controller.xml
Log:
Notes regarding configuring taglibs under Servlet 2.3 submitted by David Graham.
Revision Changes Path
1.13 +8 -4 jakarta-struts/doc/userGuide/installation.xml
Index: installation.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/installation.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- installation.xml 12 Oct 2002 16:51:40 -0000 1.12
+++ installation.xml 13 Oct 2002 15:55:12 -0000 1.13
@@ -172,8 +172,10 @@
your application classes are stored in the shared repository.</li>
<li><strong>lib/struts-*.tld</strong> - These are the "tag library
descriptor" files that describe the custom tags in the various Struts
- tag libraries. They should be copied into the <code>WEB-INF</code>
- directory of your web application.</li>
+ tag libraries. They should be copied into the <code>WEB-INF</code>
+ directory of your web application. (Servlet 2.3 can omit this step
+ if the <a href="building_controller.html#dd_config_taglib_23">standard
uri</a>
+ is referenced.)</li>
<li><strong>webapps/struts-blank.war</strong> - This is a simple "web
application archive" file containing a basic starting point for
building your own Struts-based applications.</li>
@@ -223,11 +225,13 @@
<li>Modify the <code>WEB-INF/web.xml</code> file for your web application
to include a <code><servlet></code> element to define the
controller servlet, and a <code><servlet-mapping></code> element
- to establish which request URIs are mapped to this servlet. Use the
+ to establish which request URIs are mapped to this servlet. Use the
<code>WEB-INF/web.xml</code> file from the Struts example application
for a detailed example of the required syntax.</li>
<li>Modify the <code>WEB-INF/web.xml</code> file of your web application
- to include the following tag library declarations:</li>
+ to include the following tag library declarations (Servlet 2.3 can omit
+ this step if the <a
href="building_controller.html#dd_config_taglib_23">standard uri</a>
+ is referenced):</li>
</ul>
<pre><taglib>
1.15 +124 -125 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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- building_view.xml 29 Jun 2002 14:12:01 -0000 1.14
+++ building_view.xml 13 Oct 2002 15:55:12 -0000 1.15
@@ -7,28 +7,29 @@
<author>Ted Husted</author>
<author>Martin Cooper</author>
<author>Ed Burns</author>
- <author>James DeVries</author>
+ <author>James DeVries</author>
+ <author>David Graham</author>
<title>The Struts User's Guide - Building View Components</title>
</properties>
-
- <body>
+
+ <body>
<chapter name="3. Building View Components" href="building_view">
-
+
<section name="3.1 Overview" href="overview">
-
+
<p>
This chapter focuses on the task of building the <i>View</i> components
for use with the Struts framework. Many applications rely on JavaServer
Pages
- (JSP) technology to create the presentation layer. The Struts distribution
+ (JSP) technology to create the presentation layer. The Struts distribution
includes a comprehensive JSP tag library that provides support for building
internationalized applications, as well as for interacting with input forms.
Several other topics related to the View components are briefly discussed.
</p>
-
+
</section>
-
+
<section name="3.2 Internationalized Messages" href="i18n">
-
+
<p>
A few years ago, application developers could count on having to support
only residents of their own country, who are used to only one (or sometimes
@@ -41,27 +42,27 @@
<i>internationalization</i> (often called "i18n" because 18 is the number of
letters in between the "i" and the "n") and <i>localization</i>.
</p>
-
+
<p>
- Struts builds upon the standard classes available on the Java platform to
+ Struts builds upon the standard classes available on the Java platform to
build internationalized and localized applications. The key concepts
to become familiar with are:
</p>
-
+
<ul>
- <li><a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/Locale.html"><b>Locale</b></a>
-
+ <li><a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/Locale.html"><b>Locale</b></a>
-
The fundamental Java class that supports
internationalization is <code>Locale</code>. Each
<code>Locale</code> represents a particular choice of country and
language (plus an optional language variant), and also a set of
formatting assumptions for things like numbers and dates.</li>
- <li><a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html"><b>ResourceBundle</b></a>
-
+ <li><a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html"><b>ResourceBundle</b></a>
-
The <code>java.util.ResourceBundle</code> class
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>
- <li><a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/PropertyResourceBundle.html"><b>PropertyResourceBundle</b></a>
-
+ <li><a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/PropertyResourceBundle.html"><b>PropertyResourceBundle</b></a>
-
One of the standard implementations of
<code>ResourceBundle</code> allows you to define resources using the
same "name=value" syntax used to initialize properties files. This is
@@ -76,19 +77,19 @@
The placeholder string <code>{0}</code> in the message is replaced by
the first runtime argument, <code>{1}</code> is replaced by the second
argument, and so on.</li>
- <li><a
href="api/org/apache/struts/util/MessageResources.html"><b>MessageResources</b></a> -
+ <li><a
href="api/org/apache/struts/util/MessageResources.html"><b>MessageResources</b></a> -
The Struts class <code>org.apache.struts.util.MessageResources</code>
lets you treat
a set of resource bundles like a database, and allows you to request
a particular message string for a particular Locale (normally one
associated with the current user) instead of for the default Locale
the server itself is running in.</li>
</ul>
-
+
<p>
Please note that the i18n support in a framework like Struts is limited to
the
<b>presentation</b> of internationalized text and images to the user.
- Support for Locale specific <b>input methods</b> (used with languages
- such as Japanese, Chinese, and Korean) is left up to the client device,
which
+ Support for Locale specific <b>input methods</b> (used with languages
+ such as Japanese, Chinese, and Korean) is left up to the client device,
which
is usually a web browser.
</p>
@@ -98,7 +99,7 @@
platform to create a properties file containing the messages for each
language. An example will illustrate this further:
</p>
-
+
<p>
Assume that your source code is created in package
<code>com.mycompany.mypackage</code>, so it is stored in a directory
@@ -107,27 +108,27 @@
<code>com.mycompany.mypackage.MyApplication</code>, you would create the
following files in the <code>com/mycompany/mypackage</code> directory:
</p>
-
+
<ul>
<li><b>MyApplication.properties</b> - Contains the messages in the default
language for your server. If your default language is English, you
might have an entry like this:
<code>prompt.hello=Hello</code></li>
<li><b>MyApplication_xx.properties</b> - Contains the same messages in the
- language whose ISO language code is "xx" (See the
- <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html">ResourceBundle
Javadoc</a>
+ language whose ISO language code is "xx" (See the
+ <a
href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html">ResourceBundle
Javadoc</a>
page for a link to the current list). For a French version
of the message shown above, you would have this entry:
<code>prompt.hello=Bonjour</code>
You can have resource bundle files for as many languages as you
need.</li>
</ul>
-
+
<p>
When you configure the controller servlet in the web application
deployment descriptor, one of the things you will need to define in
an initialization parameter is the base name of the resource bundle
for the application. In the case described above, it would be
- <code>com.mycompany.mypackage.MyApplication</code>.
+ <code>com.mycompany.mypackage.MyApplication</code>.
</p>
<pre>
<servlet>
@@ -140,17 +141,17 @@
<.../>
</servlet>
</pre>
-
+
<p>
- The important thing is for the resource bundle to be found on the
- class path for your application. Another approach is to store
- the <code>MyResources.properties</code> file in your application's
- <code>classes</code> folder. You can then simply specify "myResources" as
the
- application value. Just be careful it is not deleted if your
+ The important thing is for the resource bundle to be found on the
+ class path for your application. Another approach is to store
+ the <code>MyResources.properties</code> file in your application's
+ <code>classes</code> folder. You can then simply specify "myResources" as
the
+ application value. Just be careful it is not deleted if your
build script deletes classes as part of a "clean" target.
</p>
<p>
- If it does, here is an Ant task to run when compiling your application
+ If it does, here is an Ant task to run when compiling your application
that copies the contents of a <code>src/conf</code>
directory to the <code>classes</code> directory:
</p>
@@ -162,14 +163,14 @@
</pre>
</section>
- <section name="3.3 Forms and FormBean Interactions" href="form_beans">
+ <section name="3.3 Forms and FormBean Interactions" href="form_beans">
- <blockquote>
- <b>Note:</b> While the examples given here use JSP and custom tags,
- the ActionForm beans and the other Struts controller components are
- View neutral. Struts can be used with Velocity Templates, XSL, and
- any other presentation technology that can be rendered via a Java
- servlet. See the
+ <blockquote>
+ <b>Note:</b> While the examples given here use JSP and custom tags,
+ the ActionForm beans and the other Struts controller components are
+ View neutral. Struts can be used with Velocity Templates, XSL, and
+ any other presentation technology that can be rendered via a Java
+ servlet. See the
<a href="../resources/index.html">
Resources page</a> for links to additional information.
</blockquote>
@@ -183,18 +184,18 @@
needs to be changed -- without having to re-enter any of the rest of the
information on the current page or form.
</p>
-
+
<p>
Fulfilling this expectation is tedious and cumbersome when coding with
standard HTML and JSP pages. For example, an input element for a
<code>username</code> field might look like this (in JSP):
</p>
-
+
<pre>
<input type="text" name="username"
value="<%= loginBean.getUsername() %>"/>
</pre>
-
+
<p>
which is difficult to type correctly, confuses HTML developers who are
not knowledgeable about programming concepts, and can cause problems with
@@ -207,29 +208,29 @@
<html:text property="username"/>
</pre>
- <p>
+ <p>
with no need to explicitly refer to the JavaBean from which the initial
- value is retrieved. That is handled automatically by the JSP tag, using
+ value is retrieved. That is handled automatically by the JSP tag, using
facilities provided by the framework.
</p>
<p>
- HTML forms are sometimes used to upload other files. Most browsers
- support this through a <input type="file"> element, that generates
+ HTML forms are sometimes used to upload other files. Most browsers
+ support this through a <input type="file"> element, that generates
a file browse button, but it's up to the developer to handle the incoming
- files. Struts handles these "multipart" forms in a way identical to
- building normal forms. In the next section, we will cover using Struts to
- create a simple login form, and also a simple mulitpart form.
- </p>
+ files. Struts handles these "multipart" forms in a way identical to
+ building normal forms. In the next section, we will cover using Struts to
+ create a simple login form, and also a simple mulitpart form.
+ </p>
</section>
<section name="3.3.1 Building Forms With Struts" href="forms">
-
+
<p>
A complete example of a login form will illustrate how Struts
makes dealing with forms much less painful than using straight HTML
and standard JSP facilities. Consider the following page (based on the
example application included with Struts) named <code>logon.jsp</code>:
- </p>
+ </p>
<hr/>
<pre>
<%@ page language="java" %>
@@ -287,7 +288,7 @@
The following items illustrate the key features of form handling in
Struts,
based on this example:
</p>
-
+
<ul>
<li>The <code>taglib</code> directive tells the JSP page compiler where to
find the <i>tag library descriptor</i> for the Struts tag library. In
@@ -318,24 +319,24 @@
below.</li>
<li>The <b>form</b> tag renders an HTML
<code><form></code> element, based on the specified attributes.
- It also associates all of the fields within this form with a
+ It also associates all of the fields within this form with a
<code>ActionForm</code> bean
[<code>org.apache.struts.action.ActionForm</code>].
- The tag looks up the <code>/logon</code> action mapping in the Struts
- configuration.
- The <code>logon</code> mapping tells the tag that the form bean is
stored
+ The tag looks up the <code>/logon</code> action mapping in the Struts
+ configuration.
+ The <code>logon</code> mapping tells the tag that the form bean is
stored
in the session context under the key <code>logonForm</code>.
The Struts developer provides the Java implementation of the
ActionForm
bean, subclassing the Struts class <code>ActionForm</code>
- (see <a href="building_controller.html#action_form_classes">Building
+ (see <a href="building_controller.html#action_form_classes">Building
Controller</a> components).
This bean is used to provide initial values for all of the input
fields that have names matching the property names of the bean.
If an appropriate bean is not found, a new one will be created
- automatically, using the Java class name specified through the action
+ automatically, using the Java class name specified through the action
mapping.</li>
- <li>The form bean can also be specified in the tag by providing
- <code>name</code> and <code>type</code> attributes. But most often,
- everything is specified in the
+ <li>The form bean can also be specified in the tag by providing
+ <code>name</code> and <code>type</code> attributes. But most often,
+ everything is specified in the
<a href="building_controller.html#config">Struts Configuration
File</a>.
</li>
<li>The <b>text</b> tag renders an HTML
@@ -353,7 +354,7 @@
are created using message tags,
as with the prompts, so that these values are internationalized.</li>
</ul>
-
+
<p>
Handling multipart forms is also easy. Obviously when you create a
multipart
form you're creating a form that has at least one input of type "file".
The first step to
@@ -361,7 +362,7 @@
page:
</p>
-<hr/>
+<hr/>
<pre>
<%@page language="java">
<%@taglib uri="/WEB-INF/struts-html.tld"
@@ -403,27 +404,27 @@
}
}
</pre>
-<hr/>
+<hr/>
<p>
- Look at the Javadocs for <code><a
href="../api/org/apache/struts/upload/FormFile.html">FormFile</a></code>
- to see the methods it exposes to manipulate files in file uploading.
- Also look at the Javadocs for
- <a
href="http://jakarta.apache.org/struts/api/org/apache/struts/action/ActionServlet.html">ActionServlet</a>
and
+ Look at the Javadocs for <code><a
href="../api/org/apache/struts/upload/FormFile.html">FormFile</a></code>
+ to see the methods it exposes to manipulate files in file uploading.
+ Also look at the Javadocs for
+ <a
href="http://jakarta.apache.org/struts/api/org/apache/struts/action/ActionServlet.html">ActionServlet</a>
and
<a
href="http://jakarta.apache.org/struts/api/org/apache/struts/action/ActionMapping.html">ActionMapping</a>
for the various parameters
you can specify to change how files are uploaded. Basically in your
<code>execute</code> 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>
-
+ </p>
+
</section>
-
+
<section name="3.3.2 Input Field Types Supported" href="form_input">
-
+
<p>
Struts defines HTML tags for all of the following types of input fields,
with hyperlinks to the corresponding reference information.
</p>
-
+
<ul>
<li><a href="../struts-html.html#checkbox">checkboxes</a></li>
<li><a href="../struts-html.html#hidden">hidden</a> fields</li>
@@ -437,58 +438,58 @@
<li><a href="../struts-html.html#text">text</a> input fields</li>
<li><a href="../struts-html.html#textarea">textareas</a></li>
</ul>
-
+
<p>
In every
case, a field tag must be nested within a <code>form</code> tag, so that
the field knows what bean to use for initializing displayed values.
</p>
</section>
-
+
<section name="3.3.3 Other Useful Presentation Tags" href="presentation_tags">
-
+
<p>
There are several tags useful for creating presentations, consult the
documentation
- on each specific tag library, along with the Tag Developers Guides, for
more
+ on each specific tag library, along with the Tag Developers Guides, for
more
information:
</p>
-
+
<ul>
-
+
<li>[logic] <a href="../struts-logic.html#iterate">iterate</a> repeats
its tag body once
for each element of a specified collection (which can be an
Enumeration,
a Hashtable, a Vector, or an array of objects).</li>
<li>[logic] <a href="../struts-logic.html#present">present</a> depending
on which attribute
- is specified, this tag checks the current request, and evaluates the
nested
- body content of this tag only if the specified value is present. Only
one of
+ is specified, this tag checks the current request, and evaluates the
nested
+ body content of this tag only if the specified value is present. Only
one of
the attributes may be used in one occurrence of this tag, unless you
use the
- property attribute, in which case the name attribute is also
required. The
- attributes include cookie, header, name, parameter, property, role,
scope,
+ property attribute, in which case the name attribute is also
required. The
+ attributes include cookie, header, name, parameter, property, role,
scope,
and user.
</li>
- <li>[logic] <a href="../struts-logic.html#notPresent">notPresent</a> the
companion tag to
+ <li>[logic] <a href="../struts-logic.html#notPresent">notPresent</a> the
companion tag to
present, notPresent provides the same functionality when the
specified attribute
- is not present.</li>
- <li>[html] <a href="../struts-html.html#link">link</a> generates a HTML
<a> element
+ is not present.</li>
+ <li>[html] <a href="../struts-html.html#link">link</a> generates a HTML
<a> element
as an anchor definition or a hyperlink to the specified URL, and
automatically
applies URL encoding to maintain session state in the absence of
cookie support.</li>
- <li>[html] <a href="../struts-html.html#img">img</a> generates a HTML
<img> element
- with the ability to dynamically modify the URLs specified by the
"src" and
+ <li>[html] <a href="../struts-html.html#img">img</a> generates a HTML
<img> element
+ with the ability to dynamically modify the URLs specified by the
"src" and
"lowsrc" attributes in the same manner that <html:link> can.
- </li>
- <li>[bean] <a href="../struts-bean.html#parameter">parameter</a>
retrieves the value of the
+ </li>
+ <li>[bean] <a href="../struts-bean.html#parameter">parameter</a>
retrieves the value of the
specified request parameter, and defines the result as a page scope
attribute of
type String or String[].</li>
</ul>
</section>
-
- <section name="3.3.4 Automatic Form Validation" href="form_validation">
-
+
+ <section name="3.3.4 Automatic Form Validation" href="form_validation">
+
<p>
In addition to the form and bean interactions described above, Struts
offers an additional facility to validate the input fields it has
received.
- To utilize this feature, override the following method in your ActionForm
+ To utilize this feature, override the following method in your ActionForm
class:
</p>
@@ -496,18 +497,18 @@
validate(ActionMapping mapping,
HttpServletRequest request);
</pre>
-
+
<p>
The <code>validate</code> method is called by the controller servlet
after the bean
properties have been populated, but before the corresponding action
class's
<code>perform</code> method is invoked. The <code>validate</code> method
has the following options:
</p>
-
+
<ul>
<li>Perform the appropriate validations and find no problems -- Return
either
- <code>null</code> or a zero-length ActionErrors instance, and the
controller
- servlet will proceed to call the <code>perform</code> method of the
+ <code>null</code> or a zero-length ActionErrors instance, and the
controller
+ servlet will proceed to call the <code>perform</code> method of the
appropriate <code>Action</code> class.</li>
<li>Perform the appropriate validations and find problems -- Return an
ActionErrors
instance containing <code>ActionError</code>'s, which are classes
that contain
@@ -518,30 +519,28 @@
control back to the input form (identified by the <code>input</code>
property for this <code>ActionMapping</code>).</li>
</ul>
-
+
<p>
As mentioned earlier, this feature is entirely optional. The default
implementation
of the <code>validate</code> method returns <code>null</code>, and the
controller servlet
will assume that any required validation is done by the action class.
</p>
<p>
- One common approach is to perform simple, prima facia validations using
the
- ActionForm <code>validate</code> method, and then handle the "business
logic" validation
- from the Action.
+ One common approach is to perform simple, prima facia validations using
the
+ ActionForm <code>validate</code> method, and then handle the "business
logic" validation
+ from the Action.
</p>
<p>
- An optional package for performing ActionForm validations is available in
the
- Nightly Build and from <a href="http://home.earthlink.net/~dwinterfeldt/">
- David Winterfeldt's Web site</a>.
+ The Struts Validator, covered in the next section, may be used to easily
validate ActionForms.
</p>
</section>
-
- <section name="3.3.5 The Struts Validator" href="validator">
+
+ <section name="3.3.5 The Struts Validator" href="validator">
<p>[:TODO:]</p>
</section>
<section name="3.4 Other Presentation Techniques" href="other_presentations">
-
+
<p>
Although the look and feel of your application can be completely constructed
based on the standard capabilities of JSP and the Struts custom tag library,
@@ -550,9 +549,9 @@
are discussed in the following sections.
</p>
</section>
-
+
<section name="3.4.1 Application-Specific Custom Tags" href="custom_tags">
-
+
<p>
Beyond using the custom tags provided by the Struts library, it is easy
to create tags that are specific to the application you are building, to
@@ -560,7 +559,7 @@
Struts illustrates this principle by creating the following tags unique to
the implementation of this application:
</p>
-
+
<ul>
<li><b>checkLogon</b> - Checks for the existence of a particular session
object, and forwards control to the logon page if it is missing.
This is
@@ -575,28 +574,28 @@
for a User, which passes the required primary key values as
request attributes.</li>
</ul>
-
+
<p>
The source code for these tags is in the <code>src/example</code>
directory,
in package <code>org.apache.struts.example</code>, along with the other
Java
classes that are used in this application.
</p>
</section>
-
+
<section name="3.4.2 Page Composition With Includes" href="includes">
-
+
<p>
Creating the entire presentation of a page in one JSP file (with custom
tags and beans to access the required dynamic data) is a very common
design
approach, and was employed in the example application included with
Struts.
However, many applications require the display of multiple logically
distinct
portions of your application together on a single page.</p>
-
+
<p>
For example, a portal application might have some or all of the following
functional capabilities available on the portal's "home" page:
</p>
-
+
<ul>
<li>Access to a search engine for this portal.</li>
<li>One or more "news feed" displays, with the topics of interest
customized
@@ -605,7 +604,7 @@
<li>A "mail waiting" indicator if your portal provides free email
accounts.</li>
</ul>
-
+
<p>
The development of the various segments of this site is easier if you
can divide up the work, and assign different developers to the different
@@ -615,7 +614,7 @@
types of <i>include</i> available, depending on when you want the
combination
of output to occur:
</p>
-
+
<ul>
<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
@@ -644,13 +643,13 @@
</section>
<section name="3.4.4 Image Rendering Components" href="image_rendering">
-
+
<p>
Some applications require dynamically generated images, like the price
charts on a stock reporting site. Two different approaches are commonly
used
to meet these requirements:
</p>
-
+
<ul>
<li>Render a hyperlink with a URL that executes a servlet request. The
servlet will use a graphics library to render the graphical image,
@@ -668,8 +667,8 @@
<section name="3.4.5 Rendering Text" href="text_rendering">
<p>
- Some applications require dynamically generated text or markup,
- such as XML. If a complete page is being rendered, and can be output
+ Some applications require dynamically generated text or markup,
+ such as XML. If a complete page is being rendered, and can be output
using a PrintWriter, this is very easy to do from an Action:
</p>
<pre>
@@ -686,8 +685,8 @@
</chapter>
</body>
-</document>
-
+</document>
+
1.33 +37 -4 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.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- building_controller.xml 12 Oct 2002 05:15:58 -0000 1.32
+++ building_controller.xml 13 Oct 2002 15:55:12 -0000 1.33
@@ -9,7 +9,7 @@
<author>Ed Burns</author>
<author>Donald Ball</author>
<author>Eddie Bush</author>
- <author>Yann Cebron </author>
+ <author>Yann Cebron</author>
<author>David Graham</author>
<title>The Struts User's Guide - Building Controller Components</title>
</properties>
@@ -990,10 +990,9 @@
</section>
<section name="4.7.3 Configure the Struts Tag Library"
href="dd_config_taglib">
-
<p>
- Next, you must add an entry defining the Struts tag library. There are
currently four
- taglibs that Struts is packaged with.
+ Next, you must add an entry defining the Struts tag library. There are
six taglibs
+ included with the Struts distribution.
</p>
<p>
The struts-bean taglib contains tags useful in accessing
@@ -1014,6 +1013,15 @@
<p>
The struts-template taglib contains tags that define a template mechanism.
</p>
+ <p>
+ The struts-tiles taglib contains tags used for combining various view
components,
+ called "tiles", into a final composite view. This is similar to
struts-template in that
+ it's used for view composition, but tiles is a more full featured set of
tags.
+ </p>
+ <p>
+ The struts-nested taglib is an extension of other struts taglibs that
allows the use
+ of nested beans.
+ </p>
<p>
Below is how you would define all taglibs for use within your application.
@@ -1062,6 +1070,26 @@
</p>
</section>
+ <section name="4.7.3.1 Configure the Struts Tag Library (Servlet 2.3)"
href="dd_config_taglib_23">
+ <p>
+ <b>Servlet 2.3 Users only:</b> The Servlet 2.3 specification simplifies the
+ deployment and configuration of tag libraries. The instructions above will
work
+ on older containers as well as 2.3 containers (Struts only requires a
servlet 2.2 container);
+ however, if you're using a 2.3 container such as Tomcat 4.x, you can take
advantage of
+ a simplified deployment.
+ </p>
+ <p>
+ All that's required to install the struts tag libraries is to copy
struts.jar into
+ your /WEB-INF/lib directory and reference the tags in your code like this:
+ <br/>
+ <code><%@ taglib uri="http://jakarta.apache.org/struts/tags-html-1.0"
prefix="html" %></code>
+ <br/>
+ Note that you <b>must use the full uri</b> defined in the various struts
tlds so that the container
+ knows where to find the tag's class files. You don't have to alter your
web.xml file or
+ copy tlds into any application directories.
+ </p>
+ </section>
+
<section name="4.7.4 Configuring your application for modules"
href="dd_config_modules">
<p>
Very little is required in order to start taking advantage of the Struts
@@ -1221,6 +1249,11 @@
your <code>WEB-INF</code> directory, and copy <code>struts.jar</code>
(and all of the <code>commons-*.jar</code> files) into your
<code>WEB-INF/lib</code> directory.
+ </p>
+
+ <p>
+ <b>Servlet 2.3 Users:</b> See <a href="#dd_config_taglib_23">section
4.7.3.1</a>
+ for how to avoid copying the tlds into your application.
</p>
</section>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>