DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28793>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28793

RequestUtils.computeUrl() produces double-slashed ("//") HREF for <html:link> tags.

           Summary: RequestUtils.computeUrl() produces double-slashed ("//")
                    HREF for <html:link> tags.
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


A jsp document with <html:link forward="something"/> tags in it will produce an 
invalid HREF="//something.do" provided the following:
(1) The webapp in question is deployed to the root path "/"
(2) The path attribute of the forward "something" starts with a slash "/"

An example tomcat <Context> element for (1) follows:
<Context docBase="/app/web/stage1" path="/" />

An example struts <forward> element for (2) follows:
<forward name="something" path="/something.do" />

The LinkTag class uses RequestUtils.computeUrl() on line 495. RequestUtils is 
flawed in its url computation on lines 529-530 where it prepends the webapp 
context path "/" followed by RequestUtils.forwardUrl() which already contains 
the slash "/" as per the struts-config 1.1 and 1.2 DTDs. The DTDs state the 
following for the path attribute of the forward element: "This value should 
begin with a slash ("/") character."

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to