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

ServletRedirectResult and ServletActionRedirectResult should support #anchor URI syntax

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.8.1
    • Fix Version/s: 2.2.1
    • Component/s: Dispatch Filter
    • Labels:

      Description

      Expected URI syntax includes an "#anchor", as documented here:
      http://labs.apache.org/webarch/uri/rfc/rfc3986.html#fragment
      "A fragment identifier component is indicated by the presence of a number sign ("#") character and terminated by the end of the URI."

      ServletRedirectResult's current implementation allows anchor fragments to be used only if there are no query parameters present for the RedirectResult. In this case, the location param can be specified for a ServletRedirectResult with a #anchor suffix. However this does not work when using query parameters. ServletActionRedirectResult does not support #anchor due to runtime discovery of the target URI based on the actionName, namespace, and method.

      Anchor fragments should be generally supported in redirection.

        Attachments

        1. WW-3426-core-RedirectResult.patch
          9 kB
          Jason Thrasher

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              thrasher Jason Thrasher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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