Re: URL-escape a var with JSTL

Rich <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <[email protected]>
I think you just need the <c:url> tag.

-R

[email protected] wrote:
> Hello,
> 
> I need to URL-escape a variable in JSTL, and am not having much luck finding the way to do it.
> 
> For example, I currently do:
> <c:set var="foo" param="${param.foo}"/>
> 
> Since "foo" param may include some funky characters, I need to URL-escape that.  So I'm looking for something similar to:
> 
> <c:set var="foo" param="${param.foo}" escapeXml="true"/>
> 
> What's the right way to URL-encode a variable with JSTL, without resorting to scriptlets?
> Or is the only option to use escapeXml="true" when doing c:out?
> 
> Thanks,
> Otis
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
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.