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

MessageStorePreResultListener doesn't store messages for 3rd-party RedirectResult subclasses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.28
    • 2.3.29, 2.5.1
    • None
    • None

    Description

      My team uses a custom subclass of ServletRedirectResult, e.g. "org.tdar.struts.ServletRedirectResult". After updating to 2.3.8 our messages no longer survive a redirect. I believe the problem lies with this section of MessageStorePreResultListener:

      if (resultConfig != null) {
          isRedirect = ServletRedirectResult.class.getName().equals(resultConfig.getClassName())
                  || ServletActionRedirectResult.class.getName().equals(resultConfig.getClassName());
      }
      

      Per the discussion in WW-4605, the following change could likely resolve the issue:

      if (resultConfig != null) {
          isRedirect = ServletRedirectResult.class.isAssignableFrom(Class.forName(resultConfig.getClassName()));
      }
      

      Attachments

        Issue Links

          Activity

            People

              lukaszlenart Lukasz Lenart
              jtdevos Jim deVos
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: