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

StrutsPrepareAndExecuteFilter should check for response commited status

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.30
    • Fix Version/s: 2.3.31, 2.5.5
    • Component/s: None
    • Labels:
      None

      Description

      In StrutsPrepareAndExecuteFilter in doFilter method there is a code fragment

      ActionMapping mapping = this.prepare.findActionMapping(request, response, true);
      if(mapping == null) {
          boolean handled = this.execute.executeStaticResourceRequest(request, response);
          if(!handled) {
                 chain.doFilter(request, response);
          }
      } else {
          this.execute.executeAction(request, response, mapping);
      }
      

      Problem is that this.prepare.findActionMapping(request, response, true) can commit response (in case of exception), but filter continues with execution of chain, in my case causing problems up in the chain.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mhankus Mirek Hankus
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: