Bug 19221

Summary: In <c:url/> encodeURL() called twice causes duplicate jsessionid
Product: Taglibs Reporter: starbreather
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description starbreather 2003-04-22 16:36:03 UTC
When given a relative url and called twice, like this, 

<c:url var="countryUrl" value="business.jsp">
  <c:param name="lang" value="${param.lang}"/>
  <c:param name="businessType" value="${param.businessType}"/>
  <c:param name="country" value="${row.country}"/>
</c:url>
<a href="<c:url value="${countryUrl}"/>"><c:out value="${country.names
[row.country]}"/></a>

an url of the form "business.jsp;jsessionid=XYZ;jsessionid=XYZ?..." is 
generated, rendering the link invalid.
Comment 1 Pierre Delisle 2003-04-30 01:02:23 UTC
Use 
     <a href="<c:out value="${countryUrl}"/>"><c:out value="${country.names
[row.country]}"/></a>

and it will work.