Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.10
    • Component/s: None
    • Labels:
      None

      Description

      In a struts 2 application ... we use `fileUpload` interceptor to get file from user.

      The `fileUpload` has some configurations `maximumSize` , `allowedTypes` , `allowedExtensions` that can be used as:

       <interceptor-ref name="fileUpload">
          	<paramame="maximumSize">200000</param>				                          
              <param name="allowedTypes">text/plain</param>
          	 <param name="allowedExtensions">txt</param> 
         	</interceptor-ref>
      

      Is it possible to make these parameters dynamic !? For example

          <param name="maximumSize">${maxsize}</param>	
      

      and let the action set its max file size.

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Struts-JDK7-master #578 (See https://builds.apache.org/job/Struts-JDK7-master/578/)
        WW-4687 Allows define interceptors with dynamic parameters (lukaszlenart: rev 2b12f06b01f01fb02f4fae0370ae1be48bf81be3)

        • (edit) core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
        • (edit) core/src/main/java/com/opensymphony/xwork2/factory/DefaultInterceptorFactory.java
        • (edit) core/src/test/resources/xwork-test-default.xml
        • (edit) core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java
        • (add) core/src/test/java/com/opensymphony/xwork2/mock/MockLazyInterceptor.java
        • (edit) core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
        • (add) core/src/main/java/com/opensymphony/xwork2/interceptor/WithLazyParams.java
        • (edit) core/src/test/resources/xwork-sample.xml
        • (edit) core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #578 (See https://builds.apache.org/job/Struts-JDK7-master/578/ ) WW-4687 Allows define interceptors with dynamic parameters (lukaszlenart: rev 2b12f06b01f01fb02f4fae0370ae1be48bf81be3) (edit) core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java (edit) core/src/main/java/com/opensymphony/xwork2/factory/DefaultInterceptorFactory.java (edit) core/src/test/resources/xwork-test-default.xml (edit) core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java (add) core/src/test/java/com/opensymphony/xwork2/mock/MockLazyInterceptor.java (edit) core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java (add) core/src/main/java/com/opensymphony/xwork2/interceptor/WithLazyParams.java (edit) core/src/test/resources/xwork-sample.xml (edit) core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 2b12f06b01f01fb02f4fae0370ae1be48bf81be3 in struts's branch refs/heads/master from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=2b12f06 ]

        WW-4687 Allows define interceptors with dynamic parameters

        Show
        jira-bot ASF subversion and git services added a comment - Commit 2b12f06b01f01fb02f4fae0370ae1be48bf81be3 in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=2b12f06 ] WW-4687 Allows define interceptors with dynamic parameters
        Show
        lukaszlenart Lukasz Lenart added a comment - Extended docs https://cwiki.apache.org/confluence/display/WW/Interceptors#Interceptors-Lazyparameters
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        It would be good to do it with all the interceptors, some generic mechanism to allow inject expressions.

        Show
        lukaszlenart Lukasz Lenart added a comment - It would be good to do it with all the interceptors, some generic mechanism to allow inject expressions.

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            afattahi Alireza Fattahi
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development