Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4528

ChainingInterceptor does not handle lists correctly for excludes and includes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.24
    • 2.5.12
    • Core Interceptors
    • None

    Description

      The ChainingInterceptor has two parameters includes and excludes that according to the documentation and the code are Collection<String>, but the setters don't handle the specified values (that are loaded from the struts.xml) as lists. So if i specify for example
      <interceptor-ref name="chain">
      <param name="includes">x,y,z</param>
      </interceptor-ref>
      the includes variable of the interceptor becomes a Collection of one string with the value "x,y,z" instead of a Collection of three strings "x", "y" and "z".
      The behaviour should instead be similar to the ParametersInterceptor's excludeParams or MethodFilterInterceptor's excludeMethods and includeMethods.

      It would also be good if the documentation included information and an example with a list of parameters. The current documentation (https://struts.apache.org/docs/chaining-interceptor.html) only says that the parameters are lists, but the example only has one parameter

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nikos nikos dimitrakas
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: