Constant
In the various XML variants, the constant element has two required attributes: name and value.
Attribute | Required | Description |
---|---|---|
name | yes | the name of the constant |
value | yes | the value of the constant |
In the struts.properties file, each entry is treated as a constant.
In the web.xml file, any FilterDispatcher initialization parameters are loaded as constants.
用法举例:
<constant name="struts.devMode" value="true" />