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

URL tag: webapp root repeats when path saved to local variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0.2
    • 2.0.2
    • None
    • None

    Description

      Markup like

      <s:url id="url" action="showActionTagDemo" namespace="/tags/non-ui/actionTag"/><s:a href="%

      {url}">Action
      </s:a>

      should render an URI like

      * http://localhost:8080//struts2-showcase/tags/non-ui/

      but instead renders

      * http://localhost:8080/struts2-showcase/struts2-showcase/tags/non-ui/

      Meanwhile

      * <a href="<s:url id="url" action="showActionTagDemo" namespace="/tags/non-ui/actionTag"/>">Action Tag</a>

      renders correctly, the difference being one uses a local variable.

      Similarly,

      * <s:url id="url" value="/tags/non-ui/" /><s:a href="%{url}

      ">Non UI Tags Examples</s:a>

      also hiccups and renders the web application root twice.

      By contrast

      • <s:url id="url" value="date.jsp" /><s:a href="% {url}

        ">Date Tag</s:a>

      which doesn't inlcude a path, renders just fine,

      Attachments

        1. WW-1537.patch
          3 kB
          Rainer Hermanns

        Activity

          People

            rainerh Rainer Hermanns
            husted Ted Husted
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: