1 <?xml version="1.0" encoding="ISO-8859-1"?>
\r
5 DTD for the Struts Application Configuration File, Version 1.0
\r
7 To support validation of your configuration file, include the following
\r
8 DOCTYPE element at the beginning (after the "xml" declaration):
\r
10 <!DOCTYPE struts-config PUBLIC
\r
11 "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
\r
12 "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
\r
14 $Id: struts-config_1_0.dtd,v 1.5 2001/06/02 18:20:47 craigmcc Exp $
\r
18 <!-- ========== Defined Types ============================================= -->
\r
21 <!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
\r
22 and also serves as the name of the corresponding scripting variable
\r
23 and the name of the JSP attribute under which the bean is accessed.
\r
24 Therefore, it must conform to the rules for a Java identifier.
\r
26 <!ENTITY % BeanName "CDATA">
\r
29 <!-- A "Boolean" is the string representation of a boolean (true or false)
\r
32 <!ENTITY % Boolean "(true|false|yes|no)">
\r
35 <!-- A "ClassName" is the fully qualified name of a Java class that is
\r
36 instantiated to provide the functionality of the enclosing element.
\r
38 <!ENTITY % ClassName "CDATA">
\r
41 <!-- An "Integer" is a character string consisting solely of numeric digits,
\r
42 optionally preceeded by a minus sign, that can be converted to a
\r
45 <!ENTITY % Integer "CDATA">
\r
48 <!-- A "Location" is a relative path, delimited by "/" characters, that
\r
49 defines the location of a resource relative to the location of the
\r
50 Struts configuration file itself.
\r
52 <!ENTITY % Location "#PCDATA">
\r
55 <!-- A "PropName" is the name of a JavaBeans property, and must begin with
\r
56 a lower case letter and contain only characters that are legal in a
\r
59 <!ENTITY % PropName "CDATA">
\r
62 <!-- A "RequestPath" is a context-relative URI path, beginning with a slash,
\r
63 that identifies a mapped resource (such as a JSP page or a servlet)
\r
64 within this web application.
\r
66 <!ENTITY % RequestPath "CDATA">
\r
69 <!-- The name of a JSP bean scope within which such a form bean may be
\r
72 <!ENTITY % RequestScope "(request|session)">
\r
75 <!-- ========== Top Level Elements ======================================== -->
\r
78 <!-- The "struts-config" element is the root of the configuration file
\r
79 hierarchy, and contains nested elements for all of the other
\r
80 configuration settings.
\r
82 <!ELEMENT struts-config (data-sources?, form-beans?, global-forwards?, action-mappings?)>
\r
83 <!ATTLIST struts-config id ID #IMPLIED>
\r
86 <!-- The "data-sources" element describes a set of JDBC 2.0 Standard Extension
\r
87 data source objects which will be configured according to the nested
\r
88 "data-source" elements found inside.
\r
91 <!ELEMENT data-sources (data-source*)>
\r
92 <!ATTLIST data-sources id ID #IMPLIED>
\r
95 <!-- The "data-source" element describes a JDBC 2.0 Standard Extension data
\r
96 source object (that implements javax.sql.DataSource) which will be
\r
97 configured according to the properties and nested elements found here,
\r
98 and made available as a servlet context attribute (i.e. application
\r
99 scope bean). The following attributes are required:
\r
101 key Servlet context attribute key under which this data
\r
102 source will be stored. Default is the value specified
\r
103 by string constant Action.DATA_SOURCE_KEY.
\r
105 type Fully qualified Java class name of the implementation
\r
106 class (must implement javax.sql.DataSource). Default
\r
107 value is 'org.apache.struts.util.GenericDataSource'.
\r
109 NOTE: The following attributes are defined by the default data source
\r
110 implementation, and only take effect for that class or subclasses of
\r
113 WARNING: The use of these attributes is deprecated. You should use
\r
114 nested <set-property> elements to configure *all* properties of
\r
115 your data source implementation.
\r
117 autoCommit The default auto-commit state for newly created
\r
120 description The description of this data source.
\r
122 driverClass The Java class name of the JDBC driver to be used.
\r
125 loginTimeout The maximum number of seconds to wait for a connection
\r
126 to be created or returned. Default is driver dependent.
\r
128 maxCount The maximum number of connections to be created.
\r
130 minCount The minimum number of connections to be created.
\r
132 password The database password to use when connecting. [REQUIRED]
\r
134 readOnly The default read-only state for newly created
\r
137 url The JDBC URL to use when connecting. [REQUIRED]
\r
139 user The database username to use when connecting. [REQUIRED]
\r
142 <!ELEMENT data-source (set-property*)>
\r
143 <!ATTLIST data-source id ID #IMPLIED>
\r
144 <!ATTLIST data-source key %BeanName; #IMPLIED>
\r
145 <!ATTLIST data-source type %ClassName; #IMPLIED>
\r
146 <!-- All of the following attributes are deprecated. Use a nested -->
\r
147 <!-- set-property element to configure data source properties. -->
\r
148 <!ATTLIST data-source autoCommit %Boolean; #IMPLIED>
\r
149 <!ATTLIST data-source description CDATA #IMPLIED>
\r
150 <!ATTLIST data-source driverClass %ClassName; #IMPLIED>
\r
151 <!ATTLIST data-source loginTimeout %Integer; #IMPLIED>
\r
152 <!ATTLIST data-source maxCount %Integer; #IMPLIED>
\r
153 <!ATTLIST data-source minCount %Integer; #IMPLIED>
\r
154 <!ATTLIST data-source password CDATA #IMPLIED>
\r
155 <!ATTLIST data-source readOnly %Boolean; #IMPLIED>
\r
156 <!ATTLIST data-source url CDATA #IMPLIED>
\r
157 <!ATTLIST data-source user CDATA #IMPLIED>
\r
160 <!-- The "form-beans" element is the root of the set of form bean descriptors
\r
161 for this application. The following attributes are defined:
\r
163 type Fully qualified Java class name of the implementation
\r
164 class used for ActionFormBean objects. DEPRECATED.
\r
166 WARNING: For Struts 1.0, this value is ignored. You
\r
167 can set the default implementation class name with the
\r
168 "formBean" initialization parameter to the Struts
\r
169 controller servlet.
\r
171 <!ELEMENT form-beans (form-bean*)>
\r
172 <!ATTLIST form-beans id ID #IMPLIED>
\r
173 <!ATTLIST form-beans type %ClassName; "org.apache.struts.action.ActionFormBean">
\r
176 <!-- The "form-bean" element describes a particular form bean, which is a
\r
177 JavaBean that implements the org.apache.struts.action.ActionForm
\r
178 class. The following attributes are defined:
\r
180 className Fully qualified Java class name of the ActionFormBean
\r
181 implementation class to use. Defaults to the value
\r
182 configured as the "formBean" initialization parameter
\r
183 to the Struts controller servlet.
\r
185 name Unique identifier of this bean, used to reference it
\r
186 in corresponding action mappings.
\r
188 type Fully qualified Java class name of the implementation
\r
189 class to be used or generated
\r
191 <!ELEMENT form-bean (icon?, display-name?, description?, set-property*)>
\r
192 <!ATTLIST form-bean id ID #IMPLIED>
\r
193 <!ATTLIST form-bean className %ClassName; #IMPLIED>
\r
194 <!ATTLIST form-bean name %BeanName; #REQUIRED>
\r
195 <!ATTLIST form-bean type %ClassName; #REQUIRED>
\r
198 <!-- The "global-forwards" element configures the global mappings of logical
\r
199 names (used within the application) to mappable resources (identified
\r
200 by context-relative URI paths). A global "forward" with a particular name
\r
201 can be locally overridden by defining a "forward" of the same name within
\r
202 an "action" element. The following attribute are defined:
\r
204 type Fully qualified Java class name of the implementation
\r
205 class used for ActionForward objects. DEPRECATED.
\r
207 WARNING: For Struts 1.0, this value is ignored. You
\r
208 can set the default implementation class name with the
\r
209 "forward" initialization parameter to the Struts
\r
210 controller servlet.
\r
212 <!ELEMENT global-forwards (forward*)>
\r
213 <!ATTLIST global-forwards id ID #IMPLIED>
\r
214 <!ATTLIST global-forwards type %ClassName; "org.apache.struts.action.ActionForward">
\r
217 <!-- The "forward" element describes a mapping of a logical name (used within
\r
218 the application) to a mappable resource identified by a context-relative
\r
219 URI path. The following attributes are defined:
\r
221 className Fully qualified Java class name of the ActionForward
\r
222 implementation class to use. Defaults to the value
\r
223 configured as the "forward" initialization parameter
\r
224 to the Struts controller servlet.
\r
226 name Unique identifier of this forward, used to reference it
\r
227 in application action classes.
\r
229 path The context-relative path of the mapped resource.
\r
231 redirect Set to "true" if sendRedirect() should be used to forward
\r
232 to this resource, or "false" in order to use
\r
233 RequestDispatcher.forward() instead.
\r
235 <!ELEMENT forward (icon?, display-name?, description?, set-property*)>
\r
236 <!ATTLIST forward id ID #IMPLIED>
\r
237 <!ATTLIST forward className %ClassName; #IMPLIED>
\r
238 <!ATTLIST forward name CDATA #REQUIRED>
\r
239 <!ATTLIST forward path %RequestPath; #REQUIRED>
\r
240 <!ATTLIST forward redirect %Boolean; #IMPLIED>
\r
243 <!-- The "action-mappings" element configures the mappings from submitted
\r
244 request paths to the corresponding Action classes that should be
\r
245 used to process these requests. The following attributes are
\r
248 type Fully qualified Java class name of the ActionMapping
\r
249 implementation class to be used. DEPRECATED.
\r
251 WARNING: For Struts 1.0, this value is ignored. You
\r
252 can set the default implementation class name with the
\r
253 "mapping" initialization parameter to the Struts
\r
254 controller servlet.
\r
256 <!ELEMENT action-mappings (action*)>
\r
257 <!ATTLIST action-mappings id ID #IMPLIED>
\r
258 <!ATTLIST action-mappings type %ClassName; "org.apache.struts.action.ActionMapping">
\r
261 <!-- The "action" element describes a mapping from a request paths to the
\r
262 corresponding Action classes that should be used to process these
\r
263 requests. The following attributes are defined:
\r
265 attribute Name of the request-scope or session-scope attribute
\r
266 under which our form bean is accessed, if it is other
\r
267 than the bean's specified "name". Optional if
\r
268 "name" is specified, else not allowed.
\r
270 className Fully qualified Java class name of the ActionMapping
\r
271 implementation class to use. Defaults to the value
\r
272 configured as the "mapping" initialization parameter
\r
273 to the Struts controller servlet.
\r
275 forward Context-relative path of the servlet or JSP resource that
\r
276 will process this request, instead of instantiating and
\r
277 calling the Action class specified by "type". Exactly one
\r
278 of "forward", "include", or "type" must be specified.
\r
280 include Context-relative path of the servlet or JSP resource that
\r
281 will process this request, instead of instantiating and
\r
282 calling the Action class specified by "type". Exactly one
\r
283 of "forward", "include", or "type" must be specified.
\r
285 input Context-relative path of the input form to which control
\r
286 should be returned if a validation error is encountered.
\r
287 Required if "name" is specified and the input bean
\r
288 returns validation errors. Optional if "name" is
\r
289 specified and the input bean does not return validation
\r
290 errors. Not allowed if "name" is not specified.
\r
292 name Name of the form bean, if any, that is associated
\r
295 path The context-relative path of the submitted request,
\r
296 starting with a "/" character, and without the
\r
297 filename extension if extension mapping is used.
\r
299 parameter General purpose configuration parameter that can be used
\r
300 to pass extra information to the Action selected by this
\r
303 prefix Prefix used to match request parameter names to form bean
\r
304 property names, if any. Optional if "name" is specified,
\r
307 scope Identifier of the scope ("request" or "session") within
\r
308 which our form bean is accessed, if any. Optional if
\r
309 "name" is specified, else not allowed.
\r
311 suffix Suffix used to match request parameter names to form bean
\r
312 property names, if any. Optional if "name" is specified,
\r
315 type Fully qualified Java class name of the Action class
\r
316 (implements org.apache.struts.action.Action) to be
\r
317 used to process requests for this mapping if the "forward"
\r
318 or "include" attribute is not included. Exactly one
\r
319 of "forward", "include", or "type" must be specified.
\r
321 unknown Set to "true" if this action should be configured as the
\r
322 default for this application, to handle all requests
\r
323 not handled by another action. Only one action can be
\r
324 defined as a default within a single application.
\r
326 validate Set to "true" if the validate() method of the form bean
\r
327 should be called prior to calling this action, or set to
\r
328 "false" if you do not want validation performed.
\r
330 <!ELEMENT action (icon?, display-name?, description?, set-property*, forward*)>
\r
331 <!ATTLIST action id ID #IMPLIED>
\r
332 <!ATTLIST action attribute %BeanName; #IMPLIED>
\r
333 <!ATTLIST action className %ClassName; #IMPLIED>
\r
334 <!ATTLIST action forward %RequestPath; #IMPLIED>
\r
335 <!ATTLIST action include %RequestPath; #IMPLIED>
\r
336 <!ATTLIST action input %RequestPath; #IMPLIED>
\r
337 <!ATTLIST action name %BeanName; #IMPLIED>
\r
338 <!ATTLIST action parameter CDATA #IMPLIED>
\r
339 <!ATTLIST action path %RequestPath; #REQUIRED>
\r
340 <!ATTLIST action prefix CDATA #IMPLIED>
\r
341 <!ATTLIST action scope %RequestScope; #IMPLIED>
\r
342 <!ATTLIST action suffix CDATA #IMPLIED>
\r
343 <!ATTLIST action type %ClassName; #IMPLIED>
\r
344 <!ATTLIST action unknown %Boolean; #IMPLIED>
\r
345 <!ATTLIST action validate %Boolean; #IMPLIED>
\r
348 <!-- The "set-property" element specifies the name and value of an additional
\r
349 JavaBeans configuration property whose setter method will be called
\r
350 on the object that represents our surrounding element. This is especially
\r
351 useful when an extended implementation class (with additional properties)
\r
352 is configured on the <global-forwards> or <action-mappings> elements.
\r
353 The following attributes are defined:
\r
355 property Name of the JavaBeans property whose setter method
\r
358 value String representation of the value to which this
\r
359 property will be set, after suitable type conversion
\r
361 <!ELEMENT set-property EMPTY>
\r
362 <!ATTLIST set-property id ID #IMPLIED>
\r
363 <!ATTLIST set-property property %PropName; #REQUIRED>
\r
364 <!ATTLIST set-property value CDATA #REQUIRED>
\r
368 <!-- ========== Subordinate Elements ====================================== -->
\r
371 <!-- The "description" element contains descriptive (paragraph length) text
\r
372 about the surrounding element, suitable for use in GUI tools.
\r
374 <!ELEMENT description (#PCDATA)>
\r
375 <!ATTLIST description id ID #IMPLIED>
\r
379 <!-- The "display-name" element contains a short (one line) description of
\r
380 the surrounding element, suitable for use in GUI tools.
\r
382 <!ELEMENT display-name (#PCDATA)>
\r
383 <!ATTLIST display-name id ID #IMPLIED>
\r
386 <!-- The "icon" element contains a small-icon and large-icon element which
\r
387 specify the location, relative to the Struts configuration file, for small
\r
388 and large images used to represent the surrounding element in GUI tools.
\r
390 <!ELEMENT icon (small-icon?, large-icon?)>
\r
391 <!ATTLIST icon id ID #IMPLIED>
\r
394 <!-- The "large-icon" element specifies the location, relative to the Struts
\r
395 configuration file, of a resource containing a large (32x32 pixel)
\r
398 <!ELEMENT large-icon (%Location;)>
\r
399 <!ATTLIST large-icon id ID #IMPLIED>
\r
402 <!-- The "small-icon" element specifies the location, relative to the Struts
\r
403 configuration file, of a resource containing a small (16x16 pixel)
\r
406 <!ELEMENT small-icon (%Location;)>
\r
407 <!ATTLIST small-icon id ID #IMPLIED>
\r