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

[docs] document that landing on target anchors when coming from struts-config.xml 'forward path="/myAction.do"' declaration inside an action element only works if redirect="true"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 1.2.4
    • 1.4.x
    • Documentation
    • None
    • Operating System: All
      Platform: PC
    • 33547

    Description

      <!ELEMENT forward (icon?, display-name?, description?, set-property*)>
      ...
      <!ATTLIST forward name CDATA #REQUIRED>
      <!ATTLIST forward path %RequestPath; #REQUIRED>

      there is no "anchor" attribute.

      Please enhance the documentation to say how one can land after an action on a
      target anchor inside the landing jsp page? Or if that is not possible, enhance
      the dtd and implementation correspondingly.

      The same IS possible when referencing an action form a html:link
      <html:link page="/loadUser.do#bottom">Link</html:link>
      and
      <html:link page="/loadUser.do" anchor="bottom">Link</html:link>
      both do work.

      Similar to STR-1608, im struts-config.xml
      <action path="/go" type="tld.myDom.myApp.GoToAction">
      <forward name="goBottom" path="/loadUser.do#bottom" />
      </action>
      basically causes a 404 error, but as by the description there,
      <action path="/go" type="tld.myDom.myApp.GoToAction">
      <forward name="goBottom" path="/loadUser.do?def=mypage&a=a#bottom" />
      </action>
      still does not land at the target anchor, but at least, the navigation no longer
      breaks down.
      Same with the workaround explained in STR-1626 - doesn't work, but no longer
      breaks.

      perhaps
      StringBuffer path = new StringBuffer(64);
      path.append(actionMapping.findForward("success").getPath());
      path.append("#bottom");
      return new ActionForward(path.toString());
      works, but why bother the action with such navigation details?

      Attachments

        Activity

          People

            pbenedict Paul Benedict
            hauser@acm.org Ralf Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: