Struts 1
  1. Struts 1
  2. STR-908

[exception] support contextRelative paths

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Nightly Build
    • Fix Version/s: None
    • Component/s: Extras
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      It is useful for me to be able to declare that the JSP path for a global-exception handler is
      context-relative, so that I can have a family of related Struts modules that can share the
      view page for a common exception. I've patched ExceptionConfig, ExceptionHandler,
      and the struts-config DTD to support a context relative attribute for ExceptionConfig. It's
      all basically cut and paste from ForwardConfig, so I didn't make any test cases to
      demonstrate it, but I've tested it out locally.

      I figured I'd submit the patches in case others would find this useful.

        Activity

        Hide
        Joe Germuska added a comment -

        Created an attachment (id=3427)
        Add contextRelative property to ExceptionConfig

        Show
        Joe Germuska added a comment - Created an attachment (id=3427) Add contextRelative property to ExceptionConfig
        Hide
        Joe Germuska added a comment -

        Created an attachment (id=3428)
        consult the value of the contextRelative property of the Exception Config when creating a new ActionForward

        Show
        Joe Germuska added a comment - Created an attachment (id=3428) consult the value of the contextRelative property of the Exception Config when creating a new ActionForward
        Hide
        Joe Germuska added a comment -

        Created an attachment (id=3429)
        permit a contextRelative attribute in exception to correspond to new contextRelative property

        Show
        Joe Germuska added a comment - Created an attachment (id=3429) permit a contextRelative attribute in exception to correspond to new contextRelative property
        Hide
        Eddie Bush added a comment -

        Quoting ExceptionConfig.java:

        /**

        • The context-relative path of the resource to forward to if this
        • exception occurs during an <code>Action</code>.
          */
          protected String path = null;

        That would imply to me that all of them are relative to the context. Should we
        "modularize" this functionality?

        Isn't this really just a duplicate of bug # 12871?

        Show
        Eddie Bush added a comment - Quoting ExceptionConfig.java: /** The context-relative path of the resource to forward to if this exception occurs during an <code>Action</code>. */ protected String path = null; That would imply to me that all of them are relative to the context. Should we "modularize" this functionality? Isn't this really just a duplicate of bug # 12871?
        Hide
        Joe Germuska added a comment -

        Eddie wrote "Isn't this really just a duplicate of bug # 12871?" – however,
        comments on that issue indicate that it was not about the same thing.

        I still think the ability to have ExceptionConfigs optionally be
        context-relative instead of only module-relative would be nice, and I don't see
        how it would harm anything.

        Show
        Joe Germuska added a comment - Eddie wrote "Isn't this really just a duplicate of bug # 12871?" – however, comments on that issue indicate that it was not about the same thing. I still think the ability to have ExceptionConfigs optionally be context-relative instead of only module-relative would be nice, and I don't see how it would harm anything.
        Hide
        Ted Husted added a comment -

        This enhancement will be considered for a release after Struts 1.1.

        Show
        Ted Husted added a comment - This enhancement will be considered for a release after Struts 1.1.
        Hide
        Ted Husted added a comment -

        Reopening for handling.

        Show
        Ted Husted added a comment - Reopening for handling.
        Hide
        Ted Husted added a comment -
            • This bug has been marked as a duplicate of 25855 ***
        Show
        Ted Husted added a comment - This bug has been marked as a duplicate of 25855 ***
        Hide
        Ted Husted added a comment -

        I'm thinking we can leave this for post 1.2.0.

        Show
        Ted Husted added a comment - I'm thinking we can leave this for post 1.2.0.
        Hide
        Don Brown added a comment -

        Still think this is worth adding Joe?

        Show
        Don Brown added a comment - Still think this is worth adding Joe?

          People

          • Assignee:
            Unassigned
            Reporter:
            Joe Germuska
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development