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

ConversionErrorInterceptor to extend MethodFilterInterceptor

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.5.5
    • Component/s: Core Interceptors
    • Labels:
      None

      Description

      Would it be possible to modify the ConversionErrorInterceptor to extend MethodFilterInterceptor so I can exclude the validation on certain methods?
      ie

      <interceptor-ref name="conversionError">
          <param name="excludeMethods">execute,cancel*</param>
      </interceptor-ref>
      

      It seems always to be called (needs to be like the validator/workflow)

      I have noticed that if I there is a conversion error on a screen and I return with a redirectAction (and the action has a STORE and the destination action has a RETRIEVE) the conversion error shows on the destination action screen.

      Although I still get in dev mode:

      Error setting expression 'bean.weight' with value ['gggg', ]
      

      as this comes from the params interceptor (and I do not want to exclude this on my cancel), I guess we will have to live with this.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user gregh3269 opened a pull request:

          https://github.com/apache/struts/pull/108

          ConversionErrorInterceptor to extend MethodFilterIntercept

          See WW-4676

          Cheers

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/gregh3269/struts master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/struts/pull/108.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #108


          commit 5e07b9574c66110b9a44338c6c7290a65be276f3
          Author: gregh3269 <gregh3269@gmail.com>
          Date: 2016-08-03T09:50:44Z

          ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676

          commit 50fa26533a43295e70db7eca6f4f7d8c69e0d2fe
          Author: gregh3269 <gregh3269@gmail.com>
          Date: 2016-08-04T07:31:32Z

          Add java doc for MethodFilterInterceptor


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user gregh3269 opened a pull request: https://github.com/apache/struts/pull/108 ConversionErrorInterceptor to extend MethodFilterIntercept See WW-4676 Cheers You can merge this pull request into a Git repository by running: $ git pull https://github.com/gregh3269/struts master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/108.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #108 commit 5e07b9574c66110b9a44338c6c7290a65be276f3 Author: gregh3269 <gregh3269@gmail.com> Date: 2016-08-03T09:50:44Z ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 commit 50fa26533a43295e70db7eca6f4f7d8c69e0d2fe Author: gregh3269 <gregh3269@gmail.com> Date: 2016-08-04T07:31:32Z Add java doc for MethodFilterInterceptor
          Hide
          ghuber Greg Huber added a comment -

          My github is now out of sync, not sure how to fix this now, reset it to do another pull request, I think the merge from upstream I did was not correct, (commits ahead wrong?) I tried to revert it but did not work.

          The fix for this is :

          https://github.com/gregh3269/struts/commit/607fd00af00fb9a677dc69fdebcc42efedea735d

          Show
          ghuber Greg Huber added a comment - My github is now out of sync, not sure how to fix this now, reset it to do another pull request, I think the merge from upstream I did was not correct, (commits ahead wrong?) I tried to revert it but did not work. The fix for this is : https://github.com/gregh3269/struts/commit/607fd00af00fb9a677dc69fdebcc42efedea735d
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Everything is ok, you update your code, push changes to github (origin) and PR is automatically updated, no needs for merge/resets (never do it) and so on

          Show
          lukaszlenart Lukasz Lenart added a comment - Everything is ok, you update your code, push changes to github (origin) and PR is automatically updated, no needs for merge/resets (never do it) and so on
          Hide
          ghuber Greg Huber added a comment - - edited

          I don't think git should have reused the pull as I did something wrong when i merged and then I tried to revert it which also went wrong. The incorrect Revert "WW-4628: should not have touched the main repo!!

          from : https://builds.apache.org/job/Struts-JDK7-pull-request/changes

          #210 (Aug 4, 2016 9:06:20 AM)
          ConversionErrorInterceptor to extend MethodFilterIntercept. See (commit: 5e07b9574c66110b9a44338c6c7290a65be276f3) — gregh3269 / detail
          Add java doc for MethodFilterInterceptor (commit: 50fa26533a43295e70db7eca6f4f7d8c69e0d2fe) — gregh3269 / detail
          Revert "WW-4628: proper decoding of parameters in query-string" (commit: 51a49201adf73e33ba68d533f3535a32f507b531) — gregh3269 / detail
          ConversionErrorInterceptor to extend MethodFilterIntercept (commit: 607fd00af00fb9a677dc69fdebcc42efedea735d) — gregh3269 / detail

          Show
          ghuber Greg Huber added a comment - - edited I don't think git should have reused the pull as I did something wrong when i merged and then I tried to revert it which also went wrong. The incorrect Revert " WW-4628 : should not have touched the main repo!! from : https://builds.apache.org/job/Struts-JDK7-pull-request/changes #210 (Aug 4, 2016 9:06:20 AM) ConversionErrorInterceptor to extend MethodFilterIntercept. See (commit: 5e07b9574c66110b9a44338c6c7290a65be276f3) — gregh3269 / detail Add java doc for MethodFilterInterceptor (commit: 50fa26533a43295e70db7eca6f4f7d8c69e0d2fe) — gregh3269 / detail Revert " WW-4628 : proper decoding of parameters in query-string" (commit: 51a49201adf73e33ba68d533f3535a32f507b531) — gregh3269 / detail ConversionErrorInterceptor to extend MethodFilterIntercept (commit: 607fd00af00fb9a677dc69fdebcc42efedea735d) — gregh3269 / detail
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d73a8471a62604f66b22b054cb2cf08e093b27a3 in struts's branch refs/heads/master from Greg Huber
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d73a847 ]

          ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676

          Show
          jira-bot ASF subversion and git services added a comment - Commit d73a8471a62604f66b22b054cb2cf08e093b27a3 in struts's branch refs/heads/master from Greg Huber [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d73a847 ] ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6b22901814e38cdcc7be53c7c36bdc18ae0706bf in struts's branch refs/heads/master from Greg Huber
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=6b22901 ]

          ConversionErrorInterceptor to extend MethodFilterIntercept

          See WW-4676

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6b22901814e38cdcc7be53c7c36bdc18ae0706bf in struts's branch refs/heads/master from Greg Huber [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=6b22901 ] ConversionErrorInterceptor to extend MethodFilterIntercept See WW-4676
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5e07b9574c66110b9a44338c6c7290a65be276f3 in struts's branch refs/heads/master from Greg Huber
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=5e07b95 ]

          ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5e07b9574c66110b9a44338c6c7290a65be276f3 in struts's branch refs/heads/master from Greg Huber [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=5e07b95 ] ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 607fd00af00fb9a677dc69fdebcc42efedea735d in struts's branch refs/heads/master from Greg Huber
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=607fd00 ]

          ConversionErrorInterceptor to extend MethodFilterIntercept

          See WW-4676

          Show
          jira-bot ASF subversion and git services added a comment - Commit 607fd00af00fb9a677dc69fdebcc42efedea735d in struts's branch refs/heads/master from Greg Huber [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=607fd00 ] ConversionErrorInterceptor to extend MethodFilterIntercept See WW-4676
          Hide
          jira-bot ASF subversion and git services added a comment -

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

          WW-4676 Extends ConversionErrorInterceptor with MethodFilterInterceptor

          Show
          jira-bot ASF subversion and git services added a comment - Commit 9ee5c4e6efb69898fa4cd6745ca40a36cc53c690 in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9ee5c4e ] WW-4676 Extends ConversionErrorInterceptor with MethodFilterInterceptor
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/struts/pull/108

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/struts/pull/108
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          PR merged, thanks!

          Show
          lukaszlenart Lukasz Lenart added a comment - PR merged, thanks!
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Struts-JDK7-master #531 (See https://builds.apache.org/job/Struts-JDK7-master/531/)
          ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 (gregh3269: rev 5e07b9574c66110b9a44338c6c7290a65be276f3)

          • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java
            ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 (lukaszlenart: rev d73a8471a62604f66b22b054cb2cf08e093b27a3)
          • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #531 (See https://builds.apache.org/job/Struts-JDK7-master/531/ ) ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 (gregh3269: rev 5e07b9574c66110b9a44338c6c7290a65be276f3) (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 (lukaszlenart: rev d73a8471a62604f66b22b054cb2cf08e093b27a3) (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java

            People

            • Assignee:
              Unassigned
              Reporter:
              ghuber Greg Huber
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development