Interpretation of XML element in Struts

xiaoxiao2021-03-06  119

We say that struts can have one or more profiles for each module, which use XML to write, the following is the element interpretation of the element XML.

3.2.1 Element Action

This element describes an ActionMapping object that will use the URI of the user to handle the user for a module.

3.2.2 Element Action-Mappings

This element describes an actionMapping object set, which is org.apache.struts.Action.ActionMapping. User requests that match the URL pattern registered with Struts will be processed by these anctionsMapping objects. The child element defines each anctionsmapping object.

3.2.3 Element Controller

This element describes a configuration of a Struts module running environment --ControllerConfig bean

3.2.4 Elements Data-Source

This element describes a DataSource object - JDBC 2.0 standard extension. This object will be saved in the application context, and can be set like JavaBean.

3.2.5 Element Exception

This element registers an ExceptionHandler for an Exception type to the Struts system. .

3.2.6 Elements Form-Bean

This element defines an actionform [org.apache.struts.Action.Actionform subclass, which is referenced by the "action" element.

3.2.7 Element Form-Property

This element describes a JavaBean property that configures DynaActionForm or its subclasses. When this element's parent element "type" is [org.apache.Action.DynaActionform] or its subclass is valid. If a custom DynaActionform subclass is used, the "Dynamic" attribute of the parent element "form-bean" must be set to "True".

3.2.8 element forward

This element describes an ActionForward object, which will be returned by the action of the action. In the code, use a logical name to reference an ActionForward object. A "forward" can be used to describe global or local ACTIONFORWARDS. Global Forwards is valid for all Action objects in the module, local forwards nesting

Elements can only be accessed by ActionMapping in the corresponding actionMapping.

3.2.9 Elements Message-Resources

3.2.10 Element Plug-in

3.2.11 Element Set-Property

转载请注明原文地址:https://www.9cbs.com/read-125800.html

New Post(0)