struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burton Rhodes <burtonrho...@gmail.com>
Subject How to reference a struts constant from within struts.xml?
Date Thu, 09 Apr 2020 14:58:24 GMT
Is it possible to reference a Struts constant from within the same file?
In other words, I would like to define a constant inside my struts.xml file
and then reference that constant further down in the file.

For example:

[struts.xml]
<struts>

    <!-- My Constants -->
    <constant name="afs.maxFileSize" value="20971520"/>     <!-- Max size
for individual files (20 MB) -->

    <package>
        <action name="XactionActivityGeneric_update"
class="com.afs.web.struts.action.xaction.XactionActivityGenericAction"
method="update">
            <interceptor-ref name="myParamsPrepareParamsStack">
                <!-- REFERENCE MY CONSTANT HERE -->
                <param
name="fileUpload.maximumSize">${afs.maxFileSize}</param>
            </interceptor-ref>

<result>/struts/xaction/xactionActivityGenericEdit_modal.jsp</result>
        </action>
    </package>

</struts>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message