Re: JSTL 1.1.2 c:url problem?

Rashmi Rubdi <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <[email protected]>
----- Original Message ----
From: Trenton D. Adams [email protected]

>> Just out of curiosity, is JSTL supposed to do encoding by default?

I don't know that. 

The W3C specs for a link in both HTML and XHTML mention that the ampersand should be escaped as in
<a href="http://www.site.com?parameter1=abc&amp;parameter2=xyz">link text</a>

There's one more tag that uses URLs , it's <c:redirect - this requires an *unescaped* ampersand version of <c:url 
That is <c:redirect only works when the URL is http://www.site.com?parameter1=abc&parameter2=xyz  and not
http://www.site.com?parameter1=abc&amp;parameter2=xyz

May be if there are languages other than HTML that JSTL works with then, having an unescaped ampersand
makes sense if those other languages require an unescaped ampersand. But I don't know if there are other languages 
at this point.

Rashmi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.