Burton Rhodes created WW-5066:
---------------------------------

             Summary: 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


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.3.4#803005)

Reply via email to