Hey Andreas, I can't verify right now that the c taglib actually does what you say, for lack of time. I can confirm however that & signs should at all times be escaped in HTML, also when used in a href's. I've run into a similar problem with our product and had to look into it myself.
If nobody responds to this, post to the dev-list or directly place a bug in bugzilla. Grtz, Martin > -----Original Message----- > From: Andreas Schildbach [mailto:[EMAIL PROTECTED] > Sent: vrijdag 19 september 2003 11:57 > To: [EMAIL PROTECTED] > Subject: <c:url> generates incorrect encoding? > > > Hello everybody, > > please have a look at the following JSP/JSTL snippet: > > <a href="<c:url value="action.jsp"> > <c:param name="param1" value="value1"/> > <c:param name="param2" value="value2"/> > </c:url>">action</a> > > When requested by an HTTP client, the following response is returned: > > <a href="action.jsp?param1=value1¶m2=value2">action</a> > > Is this correct? I think the ampersand between the two > parameters should > be escaped, for example by using & > > To be sure, I created a test under > http://schildbach.de/test-jstl-c-out.jsp > > Please use the W3C validator (http://validator.w3.org/) and enter my > test URL, and you will get the 6 errors I attached below. > > Am I doing something wrong? Or is it an error of the JSTL > implementation? > > I am using Tomcat 4.1.27, JDK 1.4.2 and JSTL 1.03 > > Regards, > > Andreas Schildbach > > --- > > # Line 13, column 81: cannot generate system identifier for general > entity "param2" > > ...E16EDEC5EAFDA47DCBBB44?param1=value1¶m2=value2">action</a> > ^ > > # Line 13, column 81: general entity "param2" not defined and > no default > entity (explain...). > > ...E16EDEC5EAFDA47DCBBB44?param1=value1¶m2=value2">action</a> > ^ > > # Line 13, column 87: reference not terminated by REFC delimiter > > ...C5EAFDA47DCBBB44?param1=value1¶m2=value2">action</a> > ^ > > # Line 13, column 87: reference to external entity in attribute value > > ...C5EAFDA47DCBBB44?param1=value1¶m2=value2">action</a> > ^ > > # Line 13, column 87: reference to entity "param2" for which > no system > identifier could be generated > > ...C5EAFDA47DCBBB44?param1=value1¶m2=value2">action</a> > ^ > > # Line 13, column 80: entity was defined here > > ...2E16EDEC5EAFDA47DCBBB44?param1=value1¶m2=value2">action</a> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
