Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2587

Enhancements for ActionRedirect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.7
    • 1.4.0
    • Core, Extras
    • None
    • Operating System: other
      Platform: Other
    • 36698

    Description

      Now that Struts 1.2.7 supports the ActionRedirect class, I am constantly finding
      myself coding this pattern:
      ActionRedirect redirect = new ActionRedirect(mapping.findForward("name"));

      Something simpler would be:
      ActionRedirect redirect = mapping.findRedirect("name");

      Now someone needs to debate the merit of this approach. Should this find any
      forward and turn it into an ActionRedirect, or only find forwards that have the
      @redirect set to true. I don't know. Let's discuss.

      Also, I like to pass form attributes or request parameters from one request to
      another. How about a shortcut to populate the parameters like:

      redirect.addRequestParameters(request);
      redirect.addFormAttributes(form);

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: