Actually, replace s3 with test:
<c:set var="test" value="${fn:replace(test,'\\'','')}" />
Pierre Delisle wrote:
> Try this:
>
> <c:set var="test" value="${fn:replace(s3,'\\'','')}" />
>
> -- Pierre
>
>
> Eric Noel wrote:
>
>> On 4/13/2004 3:12 PM, DIGEST Paul Knox wrote:
>>
>>> Eric,
>>>
>>> problem is that you are not using the escape character, in java this is
>>> the \.
>>>
>>> so your line should be
>>>
>>> <c:set var="test" value="${fn:replace(test,'\'','')}" />
>>>
>>> Try that. It should work.
>>>
>>> -----Original Message-----
>>> From: A mailing list about Java Server Pages specification and reference
>>> [mailto:JSP-INTEREST@(protected)
>>> Sent: 13 April 2004 07:51
>>> To: JSP-INTEREST@(protected)
>>> Subject: JSP 2 / fn:replace Question
>>>
>>>
>>> I am using tomcat 5.x/jstl 1.1. How do i replace a single quote with
>>> blank using jstl 1.1, i tried the ff
>>>
>>> <c:set var="test" value="${fn:replace(test,''','')}" />
>>> ${test}
>>>
>>> but it errors
>>>
>>>
org.apache.jasper.JasperException: /test.jsp(12,0)
>>> "${fn:replace(test,''','')}" contains invalid expression(s):
>>>
javax.servlet.jsp.el.ELException: Encountered "','", expected one of
>>> [".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=",
>>> "ne", ")", ",", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&",
>>> "or", "||", "?"]
>>>
>>>
>>> Thanks for your help.
>>
>>
>>
>>
>> i did that before, same error
>>
>>
org.apache.jasper.JasperException: /test.jsp(12,0)
>> "${fn:replace(test,''','')}" contains invalid expression(s):
>>
javax.servlet.jsp.el.ELException: Encountered "','", expected one of
>> [".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=",
>> "ne", ")", ",", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&",
>> "or", "||", "?"]
>>
>> ===========================================================================
>>
>> To unsubscribe: mailto listserv@(protected)
>> JSP-INTEREST".
>> For digest: mailto listserv@(protected)
>> DIGEST".
>>
>> Some relevant archives, FAQs and Forums on JSPs can be found at:
>>
>> http://java.sun.com/products/jsp
>> http://archives.java.sun.com/jsp-interest.html
>> http://forums.java.sun.com
>> http://www.jspinsider.com
>>
>
> ===========================================================================
> To unsubscribe: mailto listserv@(protected)
> JSP-INTEREST".
> For digest: mailto listserv@(protected)
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
> http://java.sun.com/products/jsp
> http://archives.java.sun.com/jsp-interest.html
> http://forums.java.sun.com
> http://www.jspinsider.com
>
===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com