2 DTD for the Struts Application Configuration File, Version 1.1
\r
4 To support validation of your configuration file, include the following
\r
5 DOCTYPE element at the beginning (after the "xml" declaration):
\r
7 <!DOCTYPE struts-config PUBLIC
\r
8 "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
\r
9 "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
\r
11 $Id: struts-config_1_1.dtd,v 1.40 2003/05/14 08:17:16 turner Exp $
\r
15 <!-- ========== Defined Types ============================================= -->
\r
18 <!-- An "AttributeName" is the identifier of a page, request, session, or
\r
19 application scope attribute.
\r
21 <!ENTITY % AttributeName "CDATA">
\r
24 <!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
\r
25 and also serves as the name of the corresponding scripting variable
\r
26 and the name of the JSP attribute under which the bean is accessed.
\r
27 Therefore, it must conform to the rules for a Java identifier.
\r
29 <!ENTITY % BeanName "CDATA">
\r
32 <!-- A "Boolean" is the string representation of a boolean (true or false)
\r
35 <!ENTITY % Boolean "(true|false|yes|no)">
\r
38 <!-- A "ClassName" is the fully qualified name of a Java class that is
\r
39 instantiated to provide the functionality of the enclosing element.
\r
41 <!ENTITY % ClassName "CDATA">
\r
44 <!-- An "Integer" is a character string consisting solely of numeric digits,
\r
45 optionally preceeded by a minus sign, that can be converted to a
\r
48 <!ENTITY % Integer "CDATA">
\r
51 <!-- A "Location" is a relative path, delimited by "/" characters, that
\r
52 defines the location of a resource relative to the location of the
\r
53 Struts configuration file itself.
\r
55 <!ENTITY % Location "#PCDATA">
\r
58 <!-- A "PropName" is the name of a JavaBeans property, and must begin with
\r
59 a lower case letter and contain only characters that are legal in a
\r
62 <!ENTITY % PropName "CDATA">
\r
65 <!-- A "RequestPath" is an application-relative URI path, beginning with a
\r
66 slash, that identifies a mapped resource (such as a JSP page or a servlet)
\r
67 within this web application.
\r
69 <!ENTITY % RequestPath "CDATA">
\r
72 <!-- The name of a JSP bean scope within which such a form bean may be
\r
75 <!ENTITY % RequestScope "(request|session)">
\r
78 <!-- ========== Top Level Elements ======================================== -->
\r
81 <!-- The "struts-config" element is the root of the configuration file
\r
82 hierarchy, and contains nested elements for all of the other
\r
83 configuration settings.
\r
85 <!ELEMENT struts-config (data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
\r
86 <!ATTLIST struts-config id ID #IMPLIED>
\r
89 <!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
\r
90 Standard Extension]. The individual DataSource objects are configured through
\r
91 nested <data-source> elements.
\r
93 <!ELEMENT data-sources (data-source*)>
\r
94 <!ATTLIST data-sources id ID #IMPLIED>
\r
97 <!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
\r
98 Extension] that will be instantiated, configured, and made available as a
\r
99 servlet context attribute (or "application-scope bean"). Any object can be
\r
100 specified so long as it implements [javax.sql.DataSource] and can be
\r
101 configured entirely from JavaBean properties. The following attributes
\r
104 className The configuration bean for this DataSource object. If
\r
105 specified, the object must be a subclass of the default
\r
106 configuration bean.
\r
107 ["org.apache.struts.config.DataSourceConfig"]
\r
109 key Servlet context attribute key under which this data source
\r
110 will be stored. Default is the value specified by string
\r
111 constant defined by Globals.DATA_SOURCE_KEY. The application
\r
112 module prefix (if any) is appended to the key
\r
114 [org.apache.struts.Globals.DATA_SOURCE_KEY]
\r
116 NOTE: The application module prefix includes the leading
\r
117 slash, so the default datasource for a module named "foo" is
\r
118 stored under "org.apache.struts.action.DATA_SOURCE/foo".
\r
120 type Fully qualified Java class name for this data source object.
\r
121 The class must implement DataSource [javax.sql.DataSource],
\r
122 and the object must be configurable entirely from JavaBean
\r
125 <!ELEMENT data-source (set-property*)>
\r
126 <!ATTLIST data-source id ID #IMPLIED>
\r
127 <!ATTLIST data-source className %ClassName; #IMPLIED>
\r
128 <!ATTLIST data-source key %AttributeName; #IMPLIED>
\r
129 <!ATTLIST data-source type %ClassName; #IMPLIED>
\r
132 <!-- The "form-beans" element describes the set of form bean descriptors for this
\r
133 application module. The following attributes are defined:
\r
135 type Fully qualified Java class to use when instantiating
\r
136 ActionFormBean objects. If specified, the object must be a
\r
137 subclass of the default class type.
\r
140 WARNING: For Struts 1.0, this value is ignored. You
\r
141 can set the default implementation class name with the
\r
142 "formBean" initialization parameter to the Struts
\r
143 controller servlet.
\r
145 <!ELEMENT form-beans (form-bean*)>
\r
146 <!ATTLIST form-beans id ID #IMPLIED>
\r
147 <!ATTLIST form-beans type %ClassName; #IMPLIED>
\r
150 <!-- The "form-bean" element describes an ActionForm subclass
\r
151 [org.apache.struts.action.ActionForm] that can be referenced by an "action"
\r
155 The "form-bean" element describes a particular form bean, which is a
\r
156 JavaBean that implements the org.apache.struts.action.ActionForm
\r
157 class. The following attributes are defined:
\r
159 className The configuration bean for this form bean object. If
\r
160 specified, the object must be a subclass of the default
\r
161 configuration bean.
\r
162 ["org.apache.struts.config.FormBeanConfig"]
\r
164 dynamic If the form bean type is a DynaActionForm subclass (that you
\r
165 created), then (and only then) set this attribute to "true".
\r
166 If the type is set to the default DynaActionForm or any
\r
167 conventional ActionForm subclass, then this attribute can be
\r
169 [true] if type is "org.apache.struts.action.DynaActionForm"
\r
170 [false] otherwise DEPRECATED - THIS IS NOW DETERMINED
\r
171 DYNAMICALLY BASED ON THE SPECIFIED IMPLEMENTATION CLASS.
\r
173 name The unique identifier for this form bean. Referenced by the
\r
174 <action> element to specify which form bean to use with its
\r
177 type Fully qualified Java class name of the ActionForm subclass
\r
178 to use with this form bean.
\r
180 <!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
\r
181 <!ATTLIST form-bean id ID #IMPLIED>
\r
182 <!ATTLIST form-bean className %ClassName; #IMPLIED>
\r
183 <!ATTLIST form-bean dynamic %Boolean; #IMPLIED>
\r
184 <!ATTLIST form-bean name %BeanName; #REQUIRED>
\r
185 <!ATTLIST form-bean type %ClassName; #REQUIRED>
\r
188 <!-- The "form-property" element describes a JavaBean property that can be used to
\r
189 configure an instance of a DynaActionForm or a subclass thereof. This element
\r
190 is only utilized when the "type" attribute of the enclosing "form-bean" element
\r
191 is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
\r
192 a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
\r
193 enclosing <form-bean> element must be set to "true". Since Struts 1.1.
\r
195 className The configuration bean for this form property object. If
\r
196 specified, the object must be a subclass of the default
\r
197 configuration bean.
\r
198 ["org.apache.struts.config.FormPropertyConfig"]
\r
200 initial String representation of the initial value for this property.
\r
201 If not specified, primitives will be initialized to zero and
\r
202 objects initialized to the zero-argument instantiation of that
\r
203 object class. For example, Strings will be initialized to ""
\r
206 name The name of the JavaBean property described by this element.
\r
208 size The number of array elements to create if the value of the
\r
209 "type" attribute specifies an array, but there is no value
\r
210 specified for the "initial" attribute.
\r
212 type Fully qualified Java class name of the field underlying this
\r
213 property, optionally followed by "[]" to indicate that the
\r
216 <!ELEMENT form-property (set-property*)>
\r
217 <!ATTLIST form-property className %ClassName; #IMPLIED>
\r
218 <!ATTLIST form-property initial CDATA #IMPLIED>
\r
219 <!ATTLIST form-property name %PropName; #REQUIRED>
\r
220 <!ATTLIST form-property size %Integer; #IMPLIED>
\r
221 <!ATTLIST form-property type %ClassName; #REQUIRED>
\r
224 <!-- The "global-exceptions" element describes a set of exceptions that might be
\r
225 thrown by an Action object. The handling of individual exception types is
\r
226 configured through nested exception elements. An <action> element may
\r
227 override a global exception handler by registering a local exception handler
\r
228 for the same exception type. Since Struts 1.1.
\r
230 <!ELEMENT global-exceptions (exception*)>
\r
231 <!ATTLIST global-exceptions id ID #IMPLIED>
\r
234 <!-- The "exception" element registers an ExceptionHandler for an exception type.
\r
235 The following attributes are defined:
\r
237 bundle Servlet context attribute for the message resources bundle
\r
238 associated with this handler. The default attribute is the
\r
239 value specified by the string constant declared at
\r
240 Globals.MESSAGES_KEY.
\r
241 [org.apache.struts.Globals.MESSAGES_KEY]
\r
243 className The configuration bean for this ExceptionHandler object.
\r
244 If specified, className must be a subclass of the default
\r
246 ["org.apache.struts.config.ExceptionConfig"]
\r
248 handler Fully qualified Java class name for this exception handler.
\r
249 ["org.apache.struts.action.ExceptionHandler"]
\r
251 key The key to use with this handler's message resource bundle
\r
252 that will retrieve the error message template for this
\r
255 path The module-relative URI to the resource that will complete
\r
256 the request/response if this exception occurs.
\r
258 scope The context ("request" or "session") that is used to access
\r
259 the ActionError object [org.apache.struts.action.ActionError]
\r
260 for this exception.
\r
262 type Fully qualified Java class name of the exception type to
\r
263 register with this handler.
\r
265 <!ELEMENT exception (icon?, display-name?, description?, set-property*)>
\r
266 <!ATTLIST exception id ID #IMPLIED>
\r
267 <!ATTLIST exception bundle %AttributeName; #IMPLIED>
\r
268 <!ATTLIST exception className %ClassName; #IMPLIED>
\r
269 <!ATTLIST exception handler %ClassName; #IMPLIED>
\r
270 <!ATTLIST exception key CDATA #REQUIRED>
\r
271 <!ATTLIST exception path %RequestPath; #IMPLIED>
\r
272 <!ATTLIST exception scope CDATA #IMPLIED>
\r
273 <!ATTLIST exception type %ClassName; #REQUIRED>
\r
276 <!-- The "global-forwards" element describes a set of ActionForward objects
\r
277 [org.apache.struts.action.ActionForward] that are available to all Action
\r
278 objects as a return value. The individual ActionForwards are configured
\r
279 through nested <forward> elements. An <action> element may override a global
\r
280 forward by defining a local <forward> of the same name.
\r
282 type Fully qualified Java class to use when instantiating
\r
283 ActionForward objects. If specified, the object must be a
\r
284 subclass of the default class type.
\r
287 WARNING: For Struts 1.0, this value is ignored. You
\r
288 can set the default implementation class name with the
\r
289 "forward" initialization parameter to the Struts
\r
290 controller servlet.
\r
292 <!ELEMENT global-forwards (forward*)>
\r
293 <!ATTLIST global-forwards id ID #IMPLIED>
\r
294 <!ATTLIST global-forwards type %ClassName; #IMPLIED>
\r
297 <!-- The "forward" element describes an ActionForward that is to be made
\r
298 available to an Action as a return value. An ActionForward is referenced by
\r
299 a logical name and encapsulates a URI. A "forward" element may be used to
\r
300 describe both global and local ActionForwards. Global forwards are available
\r
301 to all the Action objects in the application module. Local forwards can be
\r
302 nested within an <action> element and only available to an Action object
\r
303 when it is invoked through that ActionMapping.
\r
305 className Fully qualified Java class name of ActionForward
\r
306 subclass to use for this object.
\r
307 ["org.apache.struts.action.ActionForward"]
\r
309 contextRelative Set this to "true" if, in a modular application, the path
\r
310 attribute starts with a slash "/" and should be considered
\r
311 relative to the entire web application rather than the module.
\r
315 name The unique identifier for this forward. Referenced by the
\r
316 Action object at runtime to select - by its logical name -
\r
317 the resource that should complete the request/response.
\r
319 path The module-relative or context-relative path to the resources
\r
320 that is encapsulated by the logical name of this ActionForward.
\r
321 If the path is to be considered context-relative when used in
\r
322 a modular application, then the contextRelative attribute
\r
323 should be set to "true". This value should begin with a slash
\r
326 redirect Set to "true" if a redirect instruction should be issued to
\r
327 the user-agent so that a new request is issued for this
\r
328 forward's resource. If true, RequestDispatcher.Redirect is
\r
329 called. If "false", RequestDispatcher.forward is called instead.
\r
332 <!ELEMENT forward (icon?, display-name?, description?, set-property*)>
\r
333 <!ATTLIST forward id ID #IMPLIED>
\r
334 <!ATTLIST forward className %ClassName; #IMPLIED>
\r
335 <!ATTLIST forward contextRelative %Boolean; #IMPLIED>
\r
336 <!ATTLIST forward name CDATA #REQUIRED>
\r
337 <!ATTLIST forward path %RequestPath; #REQUIRED>
\r
338 <!ATTLIST forward redirect %Boolean; #IMPLIED>
\r
341 <!-- The "action-mappings" element describes a set of ActionMapping objects
\r
342 [org.apache.struts.action.ActionMapping] that are available to process
\r
343 requests matching the url-pattern our ActionServlet registered with the
\r
344 container. The individual ActionMappings are configured through nested
\r
345 <action> elements. The following attributes are defined:
\r
347 type Fully qualified Java class to use when instantiating
\r
348 ActionMapping objects. If specified, the object must be a
\r
349 subclass of the default class type.
\r
351 WARNING: For Struts 1.0, this value is ignored. You
\r
352 can set the default implementation class name with the
\r
353 "mapping" initialization parameter to the Struts
\r
354 controller servlet.
\r
356 <!ELEMENT action-mappings (action*)>
\r
357 <!ATTLIST action-mappings id ID #IMPLIED>
\r
358 <!ATTLIST action-mappings type %ClassName; #IMPLIED>
\r
361 <!-- The "action" element describes an ActionMapping object that is to be used
\r
362 to process a request for a specific module-relative URI. The following
\r
363 attributes are defined:
\r
365 attribute Name of the request-scope or session-scope attribute that
\r
366 is used to access our ActionForm bean, if it is other than
\r
367 the bean's specified "name". Optional if "name" is specified,
\r
370 className The fully qualified Java class name of the ActionMapping
\r
371 subclass to use for this action mapping object. Defaults to
\r
372 the type specified by the enclosing <action-mappings>
\r
373 element or to "org.apache.struts.action.ActionMapping" if
\r
375 ["org.apache.struts.action.ActionMapping"]
\r
377 forward Module-relative path of the servlet or other resource that
\r
378 will process this request, instead of the Action class
\r
379 specified by "type". The path WILL NOT be processed
\r
380 through the "forwardPattern" attribute that is configured
\r
381 on the "controller" element for this application module.
\r
382 Exactly one of "forward", "include", or "type" must be
\r
385 include Module-relative path of the servlet or other resource that
\r
386 will process this request, instead of the Action class
\r
387 specified by "type". The path WILL NOT be processed
\r
388 through the "forwardPattern" attribute that is configured
\r
389 on the "controller" element for this application module.
\r
390 Exactly one of "forward", "include", or "type" must be
\r
393 input Module-relative path of the action or other resource to
\r
394 which control should be returned if a validation error is
\r
395 encountered. Valid only when "name" is specified. Required
\r
396 if "name" is specified and the input bean returns
\r
397 validation errors. Optional if "name" is specified and the
\r
398 input bean does not return validation errors.
\r
400 name Name of the form bean, if any, that is associated with this
\r
403 path The module-relative path of the submitted request, starting
\r
404 with a "/" character, and without the filename extension if
\r
405 extension mapping is used.
\r
407 NOTE: Do *not* include a period in your path name,
\r
408 because it will look like a filename extension and
\r
409 cause your Action to not be located.
\r
411 parameter General-purpose configuration parameter that can be used to
\r
412 pass extra information to the Action object selected by
\r
413 this action mapping.
\r
415 prefix Prefix used to match request parameter names to ActionForm
\r
416 property names, if any. Optional if "name" is specified,
\r
419 roles Comma-delimited list of security role names that are allowed
\r
420 access to this ActionMapping object. Since Struts 1.1.
\r
422 scope The context ("request" or "session") that is used to
\r
423 access our ActionForm bean, if any. Optional if "name" is
\r
424 specified, else not valid.
\r
426 suffix Suffix used to match request parameter names to ActionForm
\r
427 bean property names, if any. Optional if "name" is
\r
428 specified, else not valid.
\r
430 type Fully qualified Java class name of the Action subclass
\r
431 [org.apache.struts.action.Action] that will process requests
\r
432 for this action mapping. Not valid if either the "forward"
\r
433 or "include" attribute is specified. Exactly one of
\r
434 "forward", "include", or "type" must be specified.
\r
436 unknown Set to "true" if this object should be configured as the
\r
437 default action mapping for this module. If a request does not
\r
438 match another object, it will be passed to the ActionMapping
\r
439 object with unknown set to "true". Only one ActionMapping
\r
440 can be marked as "unknown" within a module.
\r
443 validate Set to "true" if the validate method of the ActionForm bean
\r
444 should be called prior to calling the Action object for this
\r
445 action mapping, or set to "false" if you do not want the
\r
446 validate method called.
\r
449 <!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
\r
450 <!ATTLIST action id ID #IMPLIED>
\r
451 <!ATTLIST action attribute %BeanName; #IMPLIED>
\r
452 <!ATTLIST action className %ClassName; #IMPLIED>
\r
453 <!ATTLIST action forward %RequestPath; #IMPLIED>
\r
454 <!ATTLIST action include %RequestPath; #IMPLIED>
\r
455 <!ATTLIST action input %RequestPath; #IMPLIED>
\r
456 <!ATTLIST action name %BeanName; #IMPLIED>
\r
457 <!ATTLIST action parameter CDATA #IMPLIED>
\r
458 <!ATTLIST action path %RequestPath; #REQUIRED>
\r
459 <!ATTLIST action prefix CDATA #IMPLIED>
\r
460 <!ATTLIST action roles CDATA #IMPLIED>
\r
461 <!ATTLIST action scope %RequestScope; #IMPLIED>
\r
462 <!ATTLIST action suffix CDATA #IMPLIED>
\r
463 <!ATTLIST action type %ClassName; #IMPLIED>
\r
464 <!ATTLIST action unknown %Boolean; #IMPLIED>
\r
465 <!ATTLIST action validate %Boolean; #IMPLIED>
\r
468 <!-- The "controller" element describes the ControllerConfig bean
\r
469 [org.apache.struts.config.ControllerConfig] that encapsulates
\r
470 an application module's runtime configuration. The following
\r
471 attributes are defined:
\r
473 bufferSize The size of the input buffer used when processing
\r
477 className Fully qualified Java class name of the
\r
478 ControllerConfig subclass for this controller object.
\r
479 If specified, the object must be a subclass of the
\r
481 ["org.apache.struts.config.ControllerConfig"]
\r
483 contentType Default content type (and optional character encoding) to
\r
484 be set on each response. May be overridden by the Action,
\r
485 JSP, or other resource to which the request is forwarded.
\r
488 debug Debugging detail level for this module. [0]
\r
489 DEPRECATED - configure the logging detail level
\r
490 in your underlying logging implementation.
\r
492 forwardPattern Replacement pattern defining how the "path" attribute of a
\r
493 <forward> element is mapped to a context-relative URL when
\r
494 it starts with a slash (and when the contextRelative
\r
495 property is false). This value may consist of any
\r
496 combination of the following:
\r
497 - "$M" - Replaced by the module prefix of this module
\r
498 - "$P" - Replaced by the "path" attribute of the selected
\r
500 - "$$" - Causes a literal dollar sign to be rendered
\r
501 - "$x" - (Where "x" is any character not defined above)
\r
502 Silently swallowed, reserved for future use
\r
503 If not specified, the default forwardPattern is "$M$P",
\r
504 which is consistent with the previous behavior of
\r
505 forwards. Since Struts 1.1. ["$M$P"]
\r
507 inputForward Set to "true" if you want the "input" attribute of
\r
508 <action> elements to be the name of a local or global
\r
509 ActionForward, which will then be used to calculate the
\r
510 ultimate URL. Set to "false" (the default) to treat the
\r
511 "input" parameter of <action> elements as a
\r
512 module-relative path to the resource
\r
513 to be used as the input form. Since Struts 1.1.
\r
516 locale Set to "true" if you want a Locale object stored in the
\r
517 user's session if not already present.
\r
520 maxFileSize The maximum size (in bytes) of a file to be accepted as a
\r
521 file upload. Can be expressed as a number followed by a
\r
522 "K", "M", or "G", which are interpreted to mean kilobytes,
\r
523 megabytes, or gigabytes, respectively.
\r
526 memFileSize The maximum size (in bytes) of a file whose contents will
\r
527 be retained in memory after uploading. Files larger than
\r
528 this threshold will be written to some alternative storage
\r
529 medium, typically a hard disk. Can be expressed as a number
\r
530 followed by a "K", "M", or "G", which are interpreted to
\r
531 mean kilobytes, megabytes, or gigabytes, respectively.
\r
534 multipartClass The fully qualified Java class name of the multipart
\r
535 request handler class to be used with this module.
\r
536 ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
\r
538 nocache Set to "true" if you want the controller to add HTTP
\r
539 headers for defeating caching to every response from
\r
540 this module. [false]
\r
542 pagePattern Replacement pattern defining how the "page" attribute of
\r
543 custom tags using it is mapped to a context-relative URL
\r
544 of the corresponding resource. This value may consist of
\r
545 any combination of the following:
\r
546 - "$M" - Replaced by the module prefix of this module
\r
547 - "$P" - Replaced by the value of the "page" attribute
\r
548 - "$$" - Causes a literal dollar sign to be rendered
\r
549 - "$x" - (Where "x" is any character not defined above)
\r
550 Silently swallowed, reserved for future use
\r
551 If not specified, the default forwardPattern is
\r
552 "$M$P", which is consistent with previous hard coded
\r
553 behavior of URL evaluation for "page" attributes.
\r
556 processorClass The fully qualified Java class name of the
\r
557 RequestProcessor subclass to be used with this module.
\r
558 ["org.apache.struts.action.RequestProcessor"]
\r
560 tempDir Temporary working directory to use when processing
\r
562 [{Directory provided by servlet container}]
\r
564 <!ELEMENT controller (set-property*)>
\r
565 <!ATTLIST controller id ID #IMPLIED>
\r
566 <!ATTLIST controller bufferSize %Integer; #IMPLIED>
\r
567 <!ATTLIST controller className %ClassName; #IMPLIED>
\r
568 <!ATTLIST controller contentType CDATA #IMPLIED>
\r
569 <!ATTLIST controller debug %Integer; #IMPLIED>
\r
570 <!ATTLIST controller forwardPattern CDATA #IMPLIED>
\r
571 <!ATTLIST controller inputForward %Boolean; #IMPLIED>
\r
572 <!ATTLIST controller locale %Boolean; #IMPLIED>
\r
573 <!ATTLIST controller maxFileSize CDATA #IMPLIED>
\r
574 <!ATTLIST controller memFileSize CDATA #IMPLIED>
\r
575 <!ATTLIST controller multipartClass %ClassName; #IMPLIED>
\r
576 <!ATTLIST controller nocache %Boolean; #IMPLIED>
\r
577 <!ATTLIST controller pagePattern CDATA #IMPLIED>
\r
578 <!ATTLIST controller processorClass %ClassName; #IMPLIED>
\r
579 <!ATTLIST controller tempDir CDATA #IMPLIED>
\r
582 <!-- The "message-resources" element describes a MessageResources object with
\r
583 message templates for this module. The following attributes are defined:
\r
585 className The configuration bean for this message resources object.
\r
586 If specified, the object must be a subclass of the default
\r
587 configuration bean.
\r
588 ["org.apache.struts.config.MessageResourcesConfig"]
\r
590 factory Fully qualified Java class name of the
\r
591 MessageResourcesFactory subclass to use for this message
\r
593 ["org.apache.struts.util.PropertyMessageResourcesFactory"]
\r
595 key Servlet context attribute under which this message
\r
596 resources bundle will be stored. The default attribute is
\r
597 the value specified by the string constant at
\r
598 [Globals.MESSAGES_KEY]. The application module prefix (if
\r
599 any) is appended to the key (${key}${prefix}).
\r
600 [org.apache.struts.Globals.MESSAGES_KEY]
\r
602 NOTE: The application module prefix includes the leading
\r
603 slash, so the default message resource bundle for a module
\r
604 named "foo" is stored under
\r
605 "org.apache.struts.action.MESSAGE/foo".
\r
607 null Set to "true" if you want our message resources to return a
\r
608 null string for unknown message keys, or "false" to return a
\r
609 message with the bad key value.
\r
611 parameter Configuration parameter to be passed to the createResources
\r
612 method of our factory object.
\r
614 <!ELEMENT message-resources (set-property*)>
\r
615 <!ATTLIST message-resources id ID #IMPLIED>
\r
616 <!ATTLIST message-resources className %ClassName; #IMPLIED>
\r
617 <!ATTLIST message-resources factory %ClassName; #IMPLIED>
\r
618 <!ATTLIST message-resources key %AttributeName; #IMPLIED>
\r
619 <!ATTLIST message-resources null %Boolean; #IMPLIED>
\r
620 <!ATTLIST message-resources parameter CDATA #REQUIRED>
\r
623 <!-- The "plug-in" element specifies the fully qualified class name of a
\r
624 general-purpose application plug-in module that receives notification of
\r
625 application startup and shutdown events. An instance of the specified class
\r
626 is created for each element, and can be configured with nested <set-property>
\r
627 elements. The following attributes are supported:
\r
629 className Fully qualified Java class name of the plug-in class; must
\r
630 implement [org.apache.struts.action.PlugIn].
\r
632 <!ELEMENT plug-in (set-property*)>
\r
633 <!ATTLIST plug-in id ID #IMPLIED>
\r
634 <!ATTLIST plug-in className %ClassName; #REQUIRED>
\r
637 <!-- ========== Subordinate Elements ====================================== -->
\r
640 <!-- The "description" element contains descriptive (paragraph length) text
\r
641 about the surrounding element, suitable for use in GUI tools.
\r
643 <!ELEMENT description (#PCDATA)>
\r
644 <!ATTLIST description id ID #IMPLIED>
\r
647 <!-- The "display-name" element contains a short (one line) description of
\r
648 the surrounding element, suitable for use in GUI tools.
\r
650 <!ELEMENT display-name (#PCDATA)>
\r
651 <!ATTLIST display-name id ID #IMPLIED>
\r
654 <!-- The "icon" element contains a small-icon and large-icon element which
\r
655 specify the location, relative to the Struts configuration file, for small
\r
656 and large images used to represent the surrounding element in GUI tools.
\r
658 <!ELEMENT icon (small-icon?, large-icon?)>
\r
659 <!ATTLIST icon id ID #IMPLIED>
\r
662 <!-- The "large-icon" element specifies the location, relative to the Struts
\r
663 configuration file, of a resource containing a large (32x32 pixel)
\r
666 <!ELEMENT large-icon (%Location;)>
\r
667 <!ATTLIST large-icon id ID #IMPLIED>
\r
670 <!-- The "set-property" element specifies the method name and initial value of
\r
671 an additional JavaBean configuration property. When the object representing
\r
672 the surrounding element is instantiated, the accessor for the indicated
\r
673 property is called and passed the indicated value. The "set-property"
\r
674 element is especially useful when a custom subclass is used with
\r
675 <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
\r
676 can be passed whatever other properties may be required to configure the
\r
677 object without changing how the struts-config is parsed.
\r
679 property Name of the JavaBeans property whose setter method
\r
682 value String representation of the value to which this
\r
683 property will be set, after suitable type conversion
\r
685 <!ELEMENT set-property EMPTY>
\r
686 <!ATTLIST set-property id ID #IMPLIED>
\r
687 <!ATTLIST set-property property %PropName; #REQUIRED>
\r
688 <!ATTLIST set-property value CDATA #REQUIRED>
\r
691 <!-- The "small-icon" element specifies the location, relative to the Struts
\r
692 configuration file, of a resource containing a small (16x16 pixel)
\r
695 <!ELEMENT small-icon (%Location;)>
\r
696 <!ATTLIST small-icon id ID #IMPLIED>
\r