You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2021/12/12 16:51:00 UTC

[jira] [Updated] (WW-5066) Allow references to struts constants from within the same (or included) XML configuration files.

     [ https://issues.apache.org/jira/browse/WW-5066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-5066:
------------------------------
    Fix Version/s: 2.6.1
                       (was: 2.6)

> Allow references to struts constants from within the same (or included) XML configuration files.
> ------------------------------------------------------------------------------------------------
>
>                 Key: WW-5066
>                 URL: https://issues.apache.org/jira/browse/WW-5066
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: XML Configuration
>    Affects Versions: Future
>            Reporter: Burton Rhodes
>            Priority: Minor
>              Labels: features
>             Fix For: 2.6.1
>
>
> It would be nice to be able to reference Struts constant declaration values from within the configuration files.
> For example, if you wanted to set a common value for "max file upload size", you could define a constant and reference it in multiple locations from within struts.xml (or any included xml configuration file)
> [struts.xml]
>  <struts>
>    <!-- Custom Constant Declarations -->
>     <constant name="my.constant.maxFileSize" value="20971520"/>     <!-- Max size for individual files (20 MB) -->
>    <package>
>        <action name="ActionName" class="com.my.action.class.ActionName">
>             <interceptor-ref name="myFileUploadStack">
>                 <!-- REFERENCE CONSTANT HERE -->
>                 <param name="fileUpload.maximumSize">${my.constant.maxFileSize}</param>
>            </interceptor-ref>
>        </action>
>     </package>
>  </struts>



--
This message was sent by Atlassian Jira
(v8.20.1#820001)