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

Add option to disable a given interceptor

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.1.1
    • Core Interceptors
    • None

    Description

      I would like interceptor references to contain a "disabled" attribute so it's possible to exclude an interceptor that's already bundled the stack.

      Example:

      <package name="default" extends="struts-default">
          <interceptors>
              <interceptor name="timer" class=".."/>
              <interceptor name="logger" class=".."/>
              <interceptor-stack name="myStack">
                  <interceptor-ref name="timer"/>
                  <interceptor-ref name="logger"/>
              </interceptor-stack>
          </interceptors>
      
          <action name="login" class="tutuorial.Login">
              <interceptor-ref name="clearSession">
                  <parem name="disabled">true</param>
              </interceptor-ref>
              <interceptor-ref name="myStack"/>
              <result name="input">login.jsp</result>
              <result name="success" type="redirectAction">/secure/home</result>
          </action>
      </package>
      

      This isn't a totally thought out idea but the gist is you shouldn't have to redefine an entire stack to take out an interceptor.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pbenedict Paul Benedict
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m