You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Rashmi Rubdi <de...@yahoo.com> on 2006/08/03 16:47:32 UTC
Is there a way to turn-off character escaping when using c:set ?
I'm processing an XML file and trying to get the value stored in the ProductURL attribute of a node.
I'm doing this:
<c:set var="value"><x:out select="@ProductURL"/></c:set>
When I output the value of @ProductURL , with just x:out, I get this:
http://www.something.com?qs1=some_value&qs2=another_value
(Notice how the ampersand is not escaped in the above URL generated from x:out)
But when I do
<c:redirect url="${value}"/> it is not working properly because , the URL stored inside value has escaped ampersands and c:redirect
requires unescaped ampersands
I could do this to get the unescaped URL:
<c:out value="${value}" escapeXml="false"/>
But, I need the unescaped url in a variable so that it can be added to the url attribute of
<c:redirect url="${value}"/>
---------------------------------
See the all-new, redesigned Yahoo.com. Check it out.
Re: Is there a way to turn-off character escaping when using c:set ?
Posted by Rashmi Rubdi <de...@yahoo.com>.
This worked! Thank you.
Kris Schneider <kr...@dotech.com> wrote:
<x:out> is doing the escaping by default. Try:
<c:set var="value"><x:out select="@ProductURL"
escapeXml="false"/></c:set>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Is there a way to turn-off character escaping when using c:set
?
Posted by Kris Schneider <kr...@dotech.com>.
<x:out> is doing the escaping by default. Try:
<c:set var="value"><x:out select="@ProductURL" escapeXml="false"/></c:set>
Rashmi Rubdi wrote:
> I'm processing an XML file and trying to get the value stored in the ProductURL attribute of a node.
>
> I'm doing this:
> <c:set var="value"><x:out select="@ProductURL"/></c:set>
>
> When I output the value of @ProductURL , with just x:out, I get this:
>
> http://www.something.com?qs1=some_value&qs2=another_value
> (Notice how the ampersand is not escaped in the above URL generated from x:out)
>
> But when I do
> <c:redirect url="${value}"/> it is not working properly because , the URL stored inside value has escaped ampersands and c:redirect
> requires unescaped ampersands
>
> I could do this to get the unescaped URL:
> <c:out value="${value}" escapeXml="false"/>
>
> But, I need the unescaped url in a variable so that it can be added to the url attribute of
> <c:redirect url="${value}"/>
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org