Suppose a JSP contains an element like this: <c:url context="/some/context/" value="/path/resource.do"/> the generated URL will contain two consecutive slashes, where they're not allowed: "...some/context//path/resource.do". Arguably such JSP is valid, as the context may end in '/', and the spec clearly mandates the leading slash of the value. The bug is non-trivial to work around (by omitting the first one of the two slashes from the JSP) in some cases, because with context="/" the trailing slash is mandatory, and the context may be introduced as a parameter so as to be both used in c:url in some places and directly concatenated with other path components in others. Part of this behavior has already been fixed as a result of bug report 22860.
Created attachment 19261 [details] Test JSP
Created attachment 19262 [details] Patch to fix this issue
Created attachment 19351 [details] Unit test for this bug. Here's a patch containing a unit test for this issue.
svn ci -m "Adding test from Bjorn Townsend and fix for #34109 - <c:url> doesn't merge slashes at the boundary of 'context' and 'value'" Sending src/org/apache/taglibs/standard/tag/common/core/UrlSupport.java Adding test/org/apache/taglibs/standard/tag/url Adding test/org/apache/taglibs/standard/tag/url/core Adding test/org/apache/taglibs/standard/tag/url/core/Test34109.java Adding test/web/org/apache/taglibs/standard/tag/url Adding test/web/org/apache/taglibs/standard/tag/url/core Adding test/web/org/apache/taglibs/standard/tag/url/core/Test34109.jsp Transmitting file data ... Committed revision 494974.